mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 09:03:44 +08:00
Merge pull request #3903 from gschlager/keyboard-patch1
FIX: Pressing Ctrl+F twice should close Discourse search window
This commit is contained in:
commit
3282aec792
|
@ -368,14 +368,14 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
_stopCallback() {
|
_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') {
|
if ((combo === 'ctrl+f' || combo === 'command+f') && element.id === 'search-term') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return oldStopCallback(e, element, combo);
|
return oldStopCallback(e, element, combo, sequence);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user