FIX: Pressing Ctrl+F twice should close Discourse search window

This commit is contained in:
Gerhard Schlager 2015-11-17 20:31:00 +01:00
parent 8dc0fa97d4
commit 2d1c21755f

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