Skip to content

Commit

Permalink
Merge pull request #62 from mailyso/prevent-duplication-for-cjk-langu…
Browse files Browse the repository at this point in the history
…ages

Prevent duplicated event in Chinese, Japanese and Korean languages
  • Loading branch information
neSpecc committed Nov 30, 2023
2 parents c79403a + 432301f commit 95b3746
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@editorjs/nested-list",
"version": "1.4.1",
"version": "1.4.2",
"keywords": [
"codex editor",
"nested-list",
Expand Down
7 changes: 7 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,13 @@ export default class NestedList {
*/
event.preventDefault();

/**
* Prevent duplicated event in Chinese, Japanese and Korean languages
*/
if (event.isComposing) {
return;
}

/**
* On Enter in the last empty item, get out of list
*/
Expand Down

0 comments on commit 95b3746

Please sign in to comment.