Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Editor.focus method optional params support #554

Closed
ivanksh opened this issue Nov 8, 2023 · 3 comments
Closed

Request for Editor.focus method optional params support #554

ivanksh opened this issue Nov 8, 2023 · 3 comments
Labels

Comments

@ivanksh
Copy link

ivanksh commented Nov 8, 2023

It would be great if Editor.focus method supported optional params (preventScroll, focusVisible - https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#parameters) and used these params when focusing in editor textarea

The reason:
We are using Editor inside nodes within some canvas and have the feature of auto focusing Editor within newly added node.
As by default preventScroll is false this causes unintentional browser scrolling the document to bring the newly-focused element into view and this is the reason for some UI issues. If Editor.focus supports preventScroll parameter we can easily control browser behavior on focus

@suren-atoyan
Copy link
Owner

editor.focus isn't implemented by this library, you should refer to the base monaco-editor library

Copy link

This issue has been marked as stale due to inactivity. It will be closed in 7 days unless further activity occurs.

@github-actions github-actions bot added the Stale label Mar 16, 2025
Copy link

Closing due to inactivity. Feel free to reopen if needed.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants