Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ export class ComposeInputModule extends ViewModule<ComposeView> {
'click',
this.view.setHandler(el => this.actionAddIntroHandler(el), this.view.errModule.handle(`add intro`))
);
this.initSquire(this.isRichText());
if (this.isRichText()) {
this.initSquire(true);
}
// Set lastDraftBody to current empty squire content ex: <div><br></div>)
// https://github.com/FlowCrypt/flowcrypt-browser/issues/5184
this.view.draftModule.setLastDraftBody(this.squire.getHTML());
Expand Down
2 changes: 1 addition & 1 deletion test/source/tests/compose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1686,7 +1686,7 @@ export const defineComposeTests = (testVariant: TestVariant, testWithBrowser: Te
expect(await composePage.read('.swal2-html-container')).to.include('Send empty message?');
await composePage.waitAndClick('.swal2-cancel');
const footer = await composePage.read('@input-body');
expect(footer).to.eq('\n\n\n\n--\n\nflowcrypt.compatibility test footer with an img\n\nand second line\n');
expect(footer).to.eq('\n\n\n--\nflowcrypt.compatibility test footer with an img\nand second line');
await composePage.waitAndClick(`@action-send`);
expect(await composePage.read('.swal2-html-container')).to.include('Send empty message?');
await composePage.waitAndClick('.swal2-cancel');
Expand Down
Loading