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
{{ message }}
Repository navigation
[lexical-react] Feature: let LexicalTypeaheadMenuPlugin open its menu outside a transition #9976
LexicalTypeaheadMenuPlugin calls openTypeahead inside startTransition. React 18 renders a transition only when no higher-priority update is pending. In a large document, where the host app keeps rendering for seconds after each edit, the menu does not appear until that work ends. We measured a median of 12 s from the trigger key to the menu. With the same menu opened as a normal update, the median is 1.3 s.
The menu is a direct response to a key press, so a transition looks like the wrong priority for it.
Request
Open the menu as a normal update. Or add a prop that opts out of the transition, for example openInTransition?: boolean with a default of true.
Related
#9332 and #9953 fix bugs with the same cause: the rendered resolution lags the editor because it is set in a transition.
Workaround today
We keep a copy of the plugin and of LexicalMenu that sets the resolution without startTransition. We would like to delete it.
Versions: Lexical 0.49, React 18.3.1. The call is still on main.
Activity