diff --git a/superset-frontend/src/SqlLab/components/AceEditorWrapper/index.tsx b/superset-frontend/src/SqlLab/components/AceEditorWrapper/index.tsx index 8f8e02d22760..fa373b5242de 100644 --- a/superset-frontend/src/SqlLab/components/AceEditorWrapper/index.tsx +++ b/superset-frontend/src/SqlLab/components/AceEditorWrapper/index.tsx @@ -121,6 +121,8 @@ class AceEditorWrapper extends React.PureComponent { } onEditorLoad(editor: any) { + editor.commands.removeCommand('find'); + editor.commands.addCommand({ name: 'runQuery', bindKey: { win: 'Alt-enter', mac: 'Alt-enter' }, @@ -128,6 +130,7 @@ class AceEditorWrapper extends React.PureComponent { this.onAltEnter(); }, }); + this.props.hotkeys.forEach(keyConfig => { editor.commands.addCommand({ name: keyConfig.name, @@ -135,6 +138,7 @@ class AceEditorWrapper extends React.PureComponent { exec: keyConfig.func, }); }); + editor.$blockScrolling = Infinity; // eslint-disable-line no-param-reassign editor.selection.on('changeSelection', () => { const selectedText = editor.getSelectedText();