actions.find not amongst supportedActions anymore
See original GitHub issueHiding the find widget via editor.trigger('', 'actions.find')
or editor.getAction('actions.find).run()
stopped working with Monaco editor 0.22.0 and later versions. editor.supportedActions();
also doesn’t list it anymore though it does for monaco versions older than 0.22.0 (notably 0.21.3). Has it been removed intentionally or is this just a bug? Also, I see that using the ctrl+f shortcut still triggers the action with ‘actions.find’ as the id and the entry in findModel.js is also still present and being registered in the findController. It just seems like it is not exposed anymore. What’s the alternative if it has been removed intentionally?
Thanks in advance
monaco-editor version: 0.22.0 - 0.22.3 Browser: OS: Playground code that reproduces the issue:
var editor = monaco.editor.create(document.getElementById("container"), {
value: `console.log("where is da good ol' actions.find");`,
language: "typescript"
});
editor.trigger('', 'actions.find'); // actions.findWithSelection however works
Edit:
https://github.com/microsoft/vscode/commit/979f9f73b3d5cd55356c0117be169fb1edbfd92b introduced a new precondition (editorIsOpen) which is not set in the browser. Therefore the isSupported
method of the IEditorAction returns false and the action is never executed.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (2 by maintainers)
invoking
editor.createContextKey('editorIsOpen', true)
after constructing the editor fixes it. I do however think that this should be the default for browsers.Just my 2 cents.
0.23 equivalent to 0.22
is:
Don’t know if the autofocus removal was intentional.