FIX: makes sure mousedown is stopped only on select-kit element
This commit is contained in:
parent
d24c35012d
commit
bd5a82cfe7
|
@ -38,14 +38,19 @@ export default Ember.Mixin.create({
|
|||
|
||||
$(document)
|
||||
.on("mousedown.select-kit", event => {
|
||||
event.stopPropagation();
|
||||
if (!this.element || this.isDestroying || this.isDestroyed) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!this.get("renderedBodyOnce")) return;
|
||||
if (!this.get("isFocused")) return;
|
||||
if (Ember.isNone(this.get("element"))) return;
|
||||
if (Ember.$.contains(this.get("element"), event.target)) return;
|
||||
if (Ember.$.contains(this.element, event.target)) {
|
||||
event.stopPropagation();
|
||||
if (!this.get("renderedBodyOnce")) return;
|
||||
if (!this.get("isFocused")) return;
|
||||
} else {
|
||||
this.didClickOutside(event);
|
||||
}
|
||||
|
||||
this.didClickOutside(event);
|
||||
return true;
|
||||
});
|
||||
|
||||
this.$header()
|
||||
|
|
Loading…
Reference in New Issue