Mailspring/internal_packages/composer/lib
Evan Morikawa 1e146f6781 fix(composer): warn when empty body
Summary:
Fixes T2276
Since the new `QuotedHTMLParser` uses full HTML parsing, when you ask it
for the version of the document without the quoted nodes, it returns a
full html document. Unfortunately I forgot about the 2 <br> tags we
manually generate when creating a reply to a message with quoted text.

This is a pretty brittle solution, but considerably easier then checking
if the contents really are "blank". We could check innerText, but would
have to worry about img tags and other text-invisible-but-still-valid
elements. Since we control the generation of the reply in the
`DraftStore`, I think this is acceptable for now

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2276

Differential Revision: https://phab.nylas.com/D1730
2015-07-13 10:12:52 -04:00
..
compose-button.cjsx feat(theming): Definitely not hacker mode. I don't know what you're talking about. 2015-06-05 11:40:44 -07:00
composer-view.cjsx fix(composer): warn when empty body 2015-07-13 10:12:52 -04:00
contenteditable-component.cjsx feat(quoted-text): New quoted text engine 2015-07-08 09:51:33 -07:00
file-upload.cjsx feat(attachments): new attachments & uploads UI with img support 2015-06-11 12:04:52 -07:00
floating-toolbar.cjsx refactor(utils): switch to regular underscore 2015-05-19 16:06:59 -07:00
image-file-upload.cjsx fix(*): Throttle so that DatabaseView won't pile on queries during scroll, better small attachment styles 2015-06-19 11:31:27 -07:00
main.cjsx feat(composer): new composer and button styles 2015-06-17 16:03:50 -07:00
participants-text-field.cjsx fix(mailto): Use paste logic to parse fields in mailto links, support poorly encoded URLs 2015-06-18 11:58:07 -07:00
scribe-template-regions.js