Merge "Scope enter keypress on file-list locally" into stable-2.15
This commit is contained in:
@@ -139,7 +139,7 @@
|
||||
'c': '_handleCKey',
|
||||
'[': '_handleLeftBracketKey',
|
||||
']': '_handleRightBracketKey',
|
||||
'o enter': '_handleOKey',
|
||||
'o': '_handleOKey',
|
||||
'n': '_handleNKey',
|
||||
'p': '_handlePKey',
|
||||
'r': '_handleRKey',
|
||||
@@ -147,6 +147,24 @@
|
||||
'esc': '_handleEscKey',
|
||||
},
|
||||
|
||||
listeners: {
|
||||
keydown: '_scopedKeydownHandler',
|
||||
},
|
||||
|
||||
/**
|
||||
* Iron-a11y-keys-behavior catches keyboard events globally. Some keyboard
|
||||
* events must be scoped to a component level (e.g. `enter`) in order to not
|
||||
* override native browser functionality.
|
||||
*
|
||||
* Context: Issue 7277
|
||||
*/
|
||||
_scopedKeydownHandler(e) {
|
||||
if (e.keyCode === 13) {
|
||||
// Enter.
|
||||
this._handleOKey(e);
|
||||
}
|
||||
},
|
||||
|
||||
reload() {
|
||||
if (!this.changeNum || !this.patchRange.patchNum) {
|
||||
return Promise.resolve();
|
||||
|
Reference in New Issue
Block a user