Skip to content

[BUG] Composer change event is not fired when all text is deleted #468

@loomchild

Description

@loomchild

Describe the bug
Composer change event is not fired on empty text (for example, when I select all the text and delete it).

To Reproduce

  1. Register a change handler on <nylas-composer> component, logging out all messages
  2. When text is added or part of it deleted, the handler is correctly fire. However, if I delete all text, it's not fire.

(Please let me know if above is sufficient - I can provide a CodePen similar if necessary)

Expected behavior
Composer should fire change event when all text is deleted. I am uncertain if this event should also be fired with empty text during initialization.

Version:
1.1.6-canary.20in

Additional context
The issue seems to be in this line, because if (onchange) onchange(html) is only being run if html is not falsy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions