You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's very common for new users to stumble with focus issues with the editor. The way that Lexical reconciles its selection to the editor should be documented.
We might also want to consider ways to control this more precisely and to detect that it shouldn't change.
A pretty common response to focus related questions:
This happens because the editor has a selection and when it updates the selection is reconciled to the DOM. The browser will always focus whatever is selected. You can either set the editor to not editable during this update, or set the selection to null
I think this issue is exacerbated by the fact that commands or registering plug-ins can cause the editor to be dirty and perform selection reconciliation even when it isn't obvious that it "should". Maybe a pair of update tags (or $functions that set editor state) to prevent or force selection change could help resolve this issue?
The text was updated successfully, but these errors were encountered:
It's very common for new users to stumble with focus issues with the editor. The way that Lexical reconciles its selection to the editor should be documented.
We might also want to consider ways to control this more precisely and to detect that it shouldn't change.
A pretty common response to focus related questions:
I think this issue is exacerbated by the fact that commands or registering plug-ins can cause the editor to be dirty and perform selection reconciliation even when it isn't obvious that it "should". Maybe a pair of update tags (or
$functions
that set editor state) to prevent or force selection change could help resolve this issue?The text was updated successfully, but these errors were encountered: