Skip to content

Commit

Permalink
fix tab update in editor javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-peugnet committed Dec 27, 2023
1 parent d4cad97 commit d51dec2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ function initForm() {
let inputs = form.elements;
for (const input of inputs) {
input.oninput = changed;
input.oninput = changeHandler;

}

form.addEventListener('submit', function(event) {
Expand Down Expand Up @@ -415,6 +417,20 @@ function keyboardHandler(e) {
}
}

/**
* Manage change event
* @param {InputEvent} e
*/
function changeHandler(e) {
if (
e.target.classList.contains('toggle') ||
e.target.classList.contains('checkboxtab')
) {
return;
}
changed();
}

/**
* Manage CodeMirror editor change event
* @param {CodeMirror.EditorFromTextArea} cm the CodeMirror instance
Expand Down

0 comments on commit d51dec2

Please sign in to comment.