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)
|
$(document)
|
||||||
.on("mousedown.select-kit", event => {
|
.on("mousedown.select-kit", event => {
|
||||||
event.stopPropagation();
|
if (!this.element || this.isDestroying || this.isDestroyed) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Ember.$.contains(this.element, event.target)) {
|
||||||
|
event.stopPropagation();
|
||||||
if (!this.get("renderedBodyOnce")) return;
|
if (!this.get("renderedBodyOnce")) return;
|
||||||
if (!this.get("isFocused")) return;
|
if (!this.get("isFocused")) return;
|
||||||
if (Ember.isNone(this.get("element"))) return;
|
} else {
|
||||||
if (Ember.$.contains(this.get("element"), event.target)) return;
|
|
||||||
|
|
||||||
this.didClickOutside(event);
|
this.didClickOutside(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$header()
|
this.$header()
|
||||||
|
|
Loading…
Reference in New Issue