Skip to content

Commit

Permalink
Merge pull request xdan#381 from k-nishijima/fix-issue-311
Browse files Browse the repository at this point in the history
added KeyboardEvent.isComposing handling (Fixes xdan#311)
  • Loading branch information
xdan authored Apr 12, 2020
2 parents c1726ad + 0c7c267 commit 6e29f8c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Jodit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,9 @@ export class Jodit extends ViewWithToolbar implements IJodit {
this.setCurrentPlace(place);
}
})
.on(editor, 'compositionend', () => {
this.setEditorValue();
})
.on(
editor,
'selectionchange selectionstart keydown keyup keypress dblclick mousedown mouseup ' +
Expand All @@ -1338,6 +1341,9 @@ export class Jodit extends ViewWithToolbar implements IJodit {
if (this.options.readonly) {
return;
}
if (event instanceof KeyboardEvent && event.isComposing) {
return;
}

if (this.events && this.events.fire) {
if (this.events.fire(event.type, event) === false) {
Expand Down

0 comments on commit 6e29f8c

Please sign in to comment.