Merge "Scope enter keypress on file-list locally" into stable-2.15
This commit is contained in:
@@ -139,7 +139,7 @@
|
|||||||
'c': '_handleCKey',
|
'c': '_handleCKey',
|
||||||
'[': '_handleLeftBracketKey',
|
'[': '_handleLeftBracketKey',
|
||||||
']': '_handleRightBracketKey',
|
']': '_handleRightBracketKey',
|
||||||
'o enter': '_handleOKey',
|
'o': '_handleOKey',
|
||||||
'n': '_handleNKey',
|
'n': '_handleNKey',
|
||||||
'p': '_handlePKey',
|
'p': '_handlePKey',
|
||||||
'r': '_handleRKey',
|
'r': '_handleRKey',
|
||||||
@@ -147,6 +147,24 @@
|
|||||||
'esc': '_handleEscKey',
|
'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() {
|
reload() {
|
||||||
if (!this.changeNum || !this.patchRange.patchNum) {
|
if (!this.changeNum || !this.patchRange.patchNum) {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
|
Reference in New Issue
Block a user