Skip to content

Commit

Permalink
Removed the confirmation of mention selection by using the space key.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredck committed May 27, 2020
1 parent 858b9f4 commit 41f03aa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
3 changes: 1 addition & 2 deletions packages/ckeditor5-mention/src/mentionui.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const handledKeyCodes = [
keyCodes.arrowdown,
keyCodes.enter,
keyCodes.tab,
keyCodes.space,
keyCodes.esc
];

Expand Down Expand Up @@ -121,7 +120,7 @@ export default class MentionUI extends Plugin {
this._mentionsView.selectPrevious();
}

if ( data.keyCode == keyCodes.enter || data.keyCode == keyCodes.tab || data.keyCode == keyCodes.space ) {
if ( data.keyCode == keyCodes.enter || data.keyCode == keyCodes.tab ) {
this._mentionsView.executeSelected();
}

Expand Down
6 changes: 0 additions & 6 deletions packages/ckeditor5-mention/tests/mentionui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1572,8 +1572,6 @@ describe( 'MentionUI', () => {
testExecuteKey( 'enter', keyCodes.enter, feedItems );

testExecuteKey( 'tab', keyCodes.tab, feedItems );

testExecuteKey( 'space', keyCodes.space, feedItems );
} );
} );

Expand Down Expand Up @@ -1724,8 +1722,6 @@ describe( 'MentionUI', () => {
testExecuteKey( 'enter', keyCodes.enter, issues );

testExecuteKey( 'tab', keyCodes.tab, issues );

testExecuteKey( 'space', keyCodes.space, issues );
} );
} );
} );
Expand Down Expand Up @@ -1849,8 +1845,6 @@ describe( 'MentionUI', () => {
testExecuteKey( 'enter', keyCodes.enter, issues );

testExecuteKey( 'tab', keyCodes.tab, issues );

testExecuteKey( 'space', keyCodes.space, issues );
} );

describe( 'mouse', () => {
Expand Down

0 comments on commit 41f03aa

Please sign in to comment.