Monaco Editor for React - use the monaco-editor in any React application without needing to use webpack (or rollup/parcel/etc) configuration files / plugins
The reason:
We are using Editorinside nodes within some canvas and have the feature of auto focusing Editor within newly added node.
As by default preventScrollis 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. IfEditor.focus supports preventScroll parameter we can easily control browser behavior on focus
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 textareaThe reason: We are using
Editor
inside nodes within some canvas and have the feature of auto focusing Editor within newly added node. As by defaultpreventScroll
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. IfEditor.focus
supports preventScroll parameter we can easily control browser behavior on focus