components icon indicating copy to clipboard operation
components copied to clipboard

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

Open loomchild opened this issue 3 years ago • 1 comments

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.

loomchild avatar Jan 24 '23 10:01 loomchild

thdsh sgs

xtaraim avatar Dec 13 '23 09:12 xtaraim