From 40a219299a76071468738a265217043388952be8 Mon Sep 17 00:00:00 2001 From: haemie Date: Wed, 13 Mar 2024 11:38:46 -0500 Subject: [PATCH] bugfix: fixed auto formatting on empty content causing unnecessary formatting on compositionend --- src/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor.js b/src/editor.js index 92079ad..c5872ab 100644 --- a/src/editor.js +++ b/src/editor.js @@ -531,7 +531,7 @@ function createHTML(options = {}) { content.oninput = function (_ref) { // var firstChild = _ref.target.firstChild; if ((anchorNode === void 0 || anchorNode === content) && queryCommandValue(formatBlock) === ''){ - if ( !compositionStatus ){ + if ( !compositionStatus || anchorNode === content){ formatParagraph(true); paragraphStatus = 0; } else {