FIX: Don't dismiss headers on modifier keys.
This commit is contained in:
parent
afdb15f99f
commit
685471303a
|
@ -155,7 +155,7 @@ export default Ember.Component.extend({
|
||||||
@on('didInsertElement')
|
@on('didInsertElement')
|
||||||
_bindEvents() {
|
_bindEvents() {
|
||||||
this.$().on('click.discourse-menu-panel', 'a', e => {
|
this.$().on('click.discourse-menu-panel', 'a', e => {
|
||||||
if (e.metaKey) { return; }
|
if (e.metaKey || e.ctrlKey || e.shiftKey) { return; }
|
||||||
if ($(e.target).data('ember-action')) { return; }
|
if ($(e.target).data('ember-action')) { return; }
|
||||||
this.hide();
|
this.hide();
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
export function isModifierOrMetaKey(event) {
|
||||||
|
return e.metaKey || e.ctrlKey || e.shiftKey;
|
||||||
|
}
|
Loading…
Reference in New Issue