mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:40:53 -06:00
FIX: Pressing Ctrl+F twice should close Discourse search window
This commit is contained in:
parent
8dc0fa97d4
commit
2d1c21755f
@ -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);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user