Loki/Prometheus Query Editor: Disabled cmd/ctrl+f keybinding within the editor (#86418)

* Prom: disable cmd f within the editor

* Loki: disable cmd f within the editor

* Update public/app/plugins/datasource/loki/components/monaco-query-field/MonacoQueryField.tsx

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* Monaco: upgrade to 0.34.1

* Loki/Prometheus: allow native search to be displayed

* Formatting

* Monaco: upgrade to 0.34.1

https://github.com/microsoft/monaco-editor/issues/102#issuecomment-1282897640

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
This commit is contained in:
Matias Chomicki
2024-04-17 16:38:43 +02:00
committed by GitHub
co-authored by Sven Grossmann
parent 9baf96dbd2
commit ec43edd8a1
10 changed files with 32 additions and 18 deletions
@@ -222,6 +222,13 @@ const MonacoQueryField = (props: Props) => {
'isEditorFocused' + id
);
// Fixes Monaco capturing the search key binding and displaying a useless search box within the Editor.
// See https://github.com/grafana/grafana/issues/85850
monaco.editor.addKeybindingRule({
keybinding: monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyF,
command: null,
});
/* Something in this configuration of monaco doesn't bubble up [mod]+K, which the
command palette uses. Pass the event out of monaco manually
*/
+1 -1
View File
@@ -75,7 +75,7 @@
"lodash": "4.17.21",
"micro-memoize": "^4.1.2",
"moment": "2.30.1",
"monaco-editor": "0.34.0",
"monaco-editor": "0.34.1",
"ol": "7.4.0",
"prismjs": "1.29.0",
"rc-cascader": "3.24.1",