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')
|
||||
_bindEvents() {
|
||||
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; }
|
||||
this.hide();
|
||||
});
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
export function isModifierOrMetaKey(event) {
|
||||
return e.metaKey || e.ctrlKey || e.shiftKey;
|
||||
}
|
Loading…
Reference in New Issue