Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5838 Added checks for RichText() before initializing squire in Secure Reply message box #5845

Merged
merged 5 commits into from
Sep 30, 2024
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);
}
martgil marked this conversation as resolved.
Show resolved Hide resolved
// 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