Skip to content

Commit 0f6c057

Browse files
committed
Editor: fix Tab/Backspace in Firefox via extraKeys execCommand
1 parent 64d5e07 commit 0f6c057

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

editor/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
tabSize: 2,
110110
indentWithTabs: false,
111111
autofocus: true,
112-
extraKeys: { Tab: function(cm) { cm.replaceSelection(' '); } },
112+
extraKeys: { Tab: cm => cm.execCommand('indentMore'), 'Shift-Tab': cm => cm.execCommand('indentLess'), Backspace: cm => cm.execCommand('delCharBefore') },
113113
});
114114
editor.setValue(DEFAULT);
115115
editor.setSize('100%', '100%');

0 commit comments

Comments
 (0)