From 5d281486d0c3f94fe74ae3ab1a16a98ba181dfe2 Mon Sep 17 00:00:00 2001 From: djmaze Date: Thu, 17 Sep 2020 16:10:27 +0200 Subject: [PATCH] Try to fix HtmlEditor isHtml() issue with SquireUI Real fix should be made with the wrong use of modeToggle() --- dev/Common/HtmlEditor.js | 2 +- dev/External/SquireUI.js | 3 --- dev/View/Popup/Compose.js | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dev/Common/HtmlEditor.js b/dev/Common/HtmlEditor.js index 7d9b2d159..64fcc4a03 100644 --- a/dev/Common/HtmlEditor.js +++ b/dev/Common/HtmlEditor.js @@ -125,7 +125,7 @@ class HtmlEditor { * @returns {boolean} */ isHtml() { - return this.editor ? 'wysiwyg' === this.editor.mode : false; + return this.editor ? 'plain' !== this.editor.mode : false; } /** diff --git a/dev/External/SquireUI.js b/dev/External/SquireUI.js index a983c87b3..68395b148 100644 --- a/dev/External/SquireUI.js +++ b/dev/External/SquireUI.js @@ -428,9 +428,6 @@ squire-raw.js:2583: this.fireEvent( event.type, event ); squire-raw.js:2864: this.fireEvent( 'pathChange', { path: newPath } ); squire-raw.js:2867: this.fireEvent( range.collapsed ? 'cursor' : 'select', { squire-raw.js:3004: this.fireEvent( 'input' ); -squire-raw.js:3080: this.fireEvent( 'input' ); -squire-raw.js:3101: this.fireEvent( 'input' ); -squire-raw.js:4036: this.fireEvent( 'willPaste', event ); squire-raw.js:4089: this.fireEvent( 'willPaste', event ); */ diff --git a/dev/View/Popup/Compose.js b/dev/View/Popup/Compose.js index b916f0d7f..f83662803 100644 --- a/dev/View/Popup/Compose.js +++ b/dev/View/Popup/Compose.js @@ -762,7 +762,7 @@ class ComposePopupView extends AbstractViewNext { onWarmUp() { if (this.modalVisibility && !this.modalVisibility()) { - this.editor((editor) => editor.modeToggle(false)); + this.editor(editor => editor.modeToggle(false)); } }