question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

actions.find not amongst supportedActions anymore

See original GitHub issue

Hiding 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:closed
  • Created 3 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
momesanacommented, Feb 23, 2021

invoking editor.createContextKey('editorIsOpen', true) after constructing the editor fixes it. I do however think that this should be the default for browsers.

0reactions
bworwacommented, Mar 13, 2021

Just my 2 cents.

0.23 equivalent to 0.22

editor.setSelection(selection)
editor.getAction('actions.find').run();

is:

editor.setSelection(selection);
editor.focus();
editor.getAction('actions.find').run();
editor.revealLineInCenter(selection.positionLineNumber);

Don’t know if the autofocus removal was intentional.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VoiceInteractionSession | Android Developers
Requests a list of supported actions from an app. ... on an object when garbage collection determines that there are no more references...
Read more >
Overview of actions in Smart IT - BMC Documentation
This topic describes the types of supported actions, platforms, and common options to configure actions in Smart IT. Related topics. Configuring ...
Read more >
QV Scalability Tools (QV10,QV11,QV12) - Page 13 - 1486942
Hey,. After recent upgrade to 12.20 SR10, i am unable to hit Qlikview servers with QlikView Scalability tool i.e. I observed that sessions...
Read more >
Repeating an action in Trello - Atlassian Support
If you have a workflow repetitive actions, try using the `R` keyboard shortcut while ... If you have an action you'd really like...
Read more >
GitHub Action workflow not running - Stack Overflow
does github still complain about the syntax? · No, no matter what I push to nothing happens, no complaints no errors that I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found