Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Removed the confirmation of mention selection by using the space and …
Browse files Browse the repository at this point in the history
…tab keys.
  • Loading branch information
fredck committed Mar 9, 2020
1 parent dd41b3e commit 9d4b261
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
4 changes: 1 addition & 3 deletions src/mentionui.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ const handledKeyCodes = [
keyCodes.arrowup,
keyCodes.arrowdown,
keyCodes.enter,
keyCodes.tab,
keyCodes.space,
keyCodes.esc
];

Expand Down Expand Up @@ -121,7 +119,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 ) {
this._mentionsView.executeSelected();
}

Expand Down
12 changes: 0 additions & 12 deletions tests/mentionui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1566,10 +1566,6 @@ describe( 'MentionUI', () => {

describe( 'on "execute" keys', () => {
testExecuteKey( 'enter', keyCodes.enter, feedItems );

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

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

Expand Down Expand Up @@ -1718,10 +1714,6 @@ describe( 'MentionUI', () => {

describe( 'on "execute" keys', () => {
testExecuteKey( 'enter', keyCodes.enter, issues );

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

testExecuteKey( 'space', keyCodes.space, issues );
} );
} );
} );
Expand Down Expand Up @@ -1843,10 +1835,6 @@ describe( 'MentionUI', () => {

describe( 'on "execute" keys', () => {
testExecuteKey( 'enter', keyCodes.enter, issues );

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

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

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

0 comments on commit 9d4b261

Please sign in to comment.