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