Skip to content

text-editor: stopTrigger() with no active trigger throws a TypeError #4166

Description

@john-traas

The trigger plugin's state.apply (src/components/text-editor/prosemirror-adapter/plugins/trigger/factory.ts) reacts to the stopTrigger transaction meta by building a triggerStop event without guarding activeTrigger === null. Calling textEditor.stopTrigger() twice, or after the trigger has already ended for another reason, throws inside getTriggerEventDetail (trigger.character on null).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions