1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-08-01 11:00:28 +02:00

Fix issue 546: Tab key not working in JS editor when using CodeMirror

- The check for the Emmet option was short-circuiting the logic for
inserting a Tab.  Note that the emmet option is only enabled on HTML and
CSS editors, (and not the JS editor), which is why the `Tab` key works in
those editors, but not the JS editor.
This commit is contained in:
Nick Hogle
2023-10-11 16:19:45 -07:00
parent bf986ce7da
commit d6e7cd3a8e

View File

@@ -344,6 +344,7 @@ export default class CodeEditor extends Component {
if (didEmmetWork === true) { if (didEmmetWork === true) {
return; return;
} }
}
const input = $('[data-setting=indentWith]:checked'); const input = $('[data-setting=indentWith]:checked');
if ( if (
!editor.somethingSelected() && !editor.somethingSelected() &&
@@ -356,7 +357,6 @@ export default class CodeEditor extends Component {
} else { } else {
CodeMirror.commands.defaultTab(editor); CodeMirror.commands.defaultTab(editor);
} }
}
}, },
Enter: 'emmetInsertLineBreak' Enter: 'emmetInsertLineBreak'
} }