Skip to content

Commit

Permalink
Merge pull request #352 from haemie/master
Browse files Browse the repository at this point in the history
fixed empty content handling causing formatting issues with compositionend
  • Loading branch information
stulip authored Nov 20, 2024
2 parents d5345d6 + 40a2192 commit 32ecf5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,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 {
Expand Down

0 comments on commit 32ecf5a

Please sign in to comment.