Merge "Add ctrl+enter shortcut in abandon dialog"

This commit is contained in:
Wyatt Allen
2017-07-28 17:06:13 +00:00
committed by Gerrit Code Review

View File

@@ -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});
}, },