Skip to content

Commit

Permalink
Merge pull request #4504 from DiemenDesign/develop
Browse files Browse the repository at this point in the history
Update changes, such as Enter check to stop double paragraphs
  • Loading branch information
Dennis Suitters committed Aug 11, 2023
2 parents 877a64c + 779294f commit ad64fe9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/js/module/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,9 @@ export default class Editor {
if (this.context.invoke(eventName) !== false) {
event.preventDefault();
// if keyMap action was invoked
if (keyName != 'ENTER') { // <--- Without this check, we get double Empty Paragraph insertion.
this.context.invoke(eventName);
}
return true;
}
} else if (key.isEdit(event.keyCode)) {
Expand Down

0 comments on commit ad64fe9

Please sign in to comment.