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,
},
behaviors: [
Gerrit.KeyboardShortcutBehavior,
],
keyBindings: {
'ctrl+enter meta+enter': '_handleEnterKey',
},
resetFocus() {
this.$.messageInput.textarea.focus();
},
_handleEnterKey(e) {
this._confirm();
},
_handleConfirmTap(e) {
e.preventDefault();
this._confirm();
},
_confirm() {
this.fire('confirm', {reason: this.message}, {bubbles: false});
},