Replies: 3 comments
-
I'm facing this issue when executing |
Beta Was this translation helpful? Give feedback.
-
Hi, it seems there is no option that could be provided as prop to work around this issue other than "options={{ contextmenu: false}}". However, this only solves the issue with the clicker, yet the user might still access it via the F1 key. The error is not just about not wanting it to appear, but also that it creates an unhandled async function that resolves to error as many times as the cursor moves up and down. If you're working with React, you might think that using a ref || forwardRef might help, but that's not the case with this editor. So, there are two possible ways to work around it:
That will get you what you want. |
Beta Was this translation helpful? Give feedback.
-
I'm triggering the command palette using this trigger when an "external button" is clicked. In this case, for accessibility reasons, when the user exclusively uses the keyboard and presses the ESC key to hide the palette, they are now focussed into the editor and are not able to escape out to the "external button" where they triggered the palette from. What I'm looking for is a callback when the palette closes and let's me know where the palette was originally triggered from. |
Beta Was this translation helpful? Give feedback.
-
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Code
Actual Behavior
Right click or F1 allows users of the application to access the command palette
Some commands do not work and throw unhandled errors we cannot catch
e.g. Indent using spaces.
Error thrown is "Quick input service needs a focused editor to work"
Expected Behavior
As this is readonly we have no desire for the command palette to be enabled/accessible but there seems to be no way to suppress it.
If it is there, we would expect to be able to suppress operations which will throw errors, or some way to intercept and handle the errors.
Additional Context
As this is a react application we do not want to be doing any workaround which involves messing with the dom directly.
Beta Was this translation helpful? Give feedback.
All reactions