Merge pull request #3903 from gschlager/keyboard-patch1

FIX: Pressing Ctrl+F twice should close Discourse search window
This commit is contained in:
Robin Ward 2015-11-17 14:38:14 -05:00
commit 3282aec792

View File

@ -368,14 +368,14 @@ export default {
},
_stopCallback() {
const oldStopCallback = this.keyTrapper.stopCallback;
const oldStopCallback = this.keyTrapper.prototype.stopCallback;
this.keyTrapper.stopCallback = function(e, element, combo) {
this.keyTrapper.prototype.stopCallback = function(e, element, combo, sequence) {
if ((combo === 'ctrl+f' || combo === 'command+f') && element.id === 'search-term') {
return false;
}
return oldStopCallback(e, element, combo);
return oldStopCallback(e, element, combo, sequence);
};
}
};