[Feature Request] Request for Editor.focus method optional params support
Context
- [X] This issue is not a bug report. (please use a different template for reporting a bug)
- [X] This issue is not a duplicate of an existing issue. (please use the search to find existing issues)
Description
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
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
No response
Related: #4042
Can you provide monaco editor playground example that demonstrates the problem? Thanks!