Skip to content

Problem & Fix for tab character... #26

@AzzaAzza69

Description

@AzzaAzza69

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
}
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions