-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Description
As you manipulate the string via code in the check_tab function, the ability to undo (ctrl+z) is lost...can I suggest instead:
function check_tab(element, event) {
let code = element.value;
if(event.key == "Tab") {
/* Tab key pressed */
event.preventDefault(); // stop normal
document.execCommand('insertText', false, "\t");
update(element.value); // Update text to include indent
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels