Skip to content

Commit 40a2192

Browse files
committed
bugfix: fixed auto formatting on empty content causing unnecessary formatting on compositionend
1 parent b5310db commit 40a2192

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/editor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ function createHTML(options = {}) {
531531
content.oninput = function (_ref) {
532532
// var firstChild = _ref.target.firstChild;
533533
if ((anchorNode === void 0 || anchorNode === content) && queryCommandValue(formatBlock) === ''){
534-
if ( !compositionStatus ){
534+
if ( !compositionStatus || anchorNode === content){
535535
formatParagraph(true);
536536
paragraphStatus = 0;
537537
} else {

0 commit comments

Comments
 (0)