Skip to content

Commit

Permalink
Disable query input keyboard shortcuts outside of query input. (#18160)
Browse files Browse the repository at this point in the history
  • Loading branch information
linuspahl authored Feb 5, 2024
1 parent 3afdedf commit 64a3b0d
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,29 +184,36 @@ const useCompleter = ({ streams, timeRange, completerFactory, view }: Pick<Props
};

const useShowHotkeysInOverview = () => {
const options = { enabled: false };

useHotkey({
scope: 'query-input',
actionKey: 'submit-search',
options,
});

useHotkey({
scope: 'query-input',
actionKey: 'insert-newline',
options,
});

useHotkey({
scope: 'query-input',
actionKey: 'create-search-filter',
options,
});

useHotkey({
scope: 'query-input',
actionKey: 'show-suggestions',
options,
});

useHotkey({
scope: 'query-input',
actionKey: 'show-history',
options,
});
};

Expand Down Expand Up @@ -282,8 +289,6 @@ const QueryInput = React.forwardRef<Editor, Props>(({
name: 'Show completions',
bindKey: { win: 'Alt-Space', mac: 'Alt-Space' },
exec: async (editor: Editor) => {
console.log('test', editor.getValue());

if (editor.getValue()) {
startAutocomplete(editor);

Expand Down

0 comments on commit 64a3b0d

Please sign in to comment.