Fix hotkeys in Ace Editor (#617)

- Corrects Cmd + L (selects URL bar)
- Corrects Cmd + F (opens find command)

Closes #304
This commit is contained in:
RachelElysia
2021-04-09 08:50:47 -07:00
committed by GitHub
parent b7f81a8c39
commit 46d957a367
+6 -1
View File
@@ -77,6 +77,11 @@ class KolideAce extends Component {
[`${baseClass}__wrapper--error`]: error,
});
const fixHotkeys = (editor) => {
editor.commands.removeCommands(['gotoline', 'find']);
onLoad && onLoad(editor);
};
return (
<div className={wrapperClass}>
{renderLabel()}
@@ -90,7 +95,7 @@ class KolideAce extends Component {
maxLines={20}
name={name}
onChange={onChange}
onLoad={onLoad}
onLoad={fixHotkeys}
readOnly={readOnly}
setOptions={{ enableLinking: true }}
showGutter={showGutter}