Skip to content

[lexical-react] Feature: let LexicalTypeaheadMenuPlugin open its menu outside a transition #9976

Backlog

Description

@AgarwalKush

Problem

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

  1. added
    enhancement
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions