Merge "Add ctrl+enter shortcut in abandon dialog"
This commit is contained in:
@@ -33,12 +33,28 @@
|
|||||||
message: String,
|
message: String,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
behaviors: [
|
||||||
|
Gerrit.KeyboardShortcutBehavior,
|
||||||
|
],
|
||||||
|
|
||||||
|
keyBindings: {
|
||||||
|
'ctrl+enter meta+enter': '_handleEnterKey',
|
||||||
|
},
|
||||||
|
|
||||||
resetFocus() {
|
resetFocus() {
|
||||||
this.$.messageInput.textarea.focus();
|
this.$.messageInput.textarea.focus();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_handleEnterKey(e) {
|
||||||
|
this._confirm();
|
||||||
|
},
|
||||||
|
|
||||||
_handleConfirmTap(e) {
|
_handleConfirmTap(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
this._confirm();
|
||||||
|
},
|
||||||
|
|
||||||
|
_confirm() {
|
||||||
this.fire('confirm', {reason: this.message}, {bubbles: false});
|
this.fire('confirm', {reason: this.message}, {bubbles: false});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user