FIX: makes sure fixed positioning is correctly applied and removed
This commit is contained in:
parent
d7dbda1503
commit
9219786a24
|
@ -9,7 +9,10 @@ export default SelectBoxKitComponent.extend({
|
||||||
headerComponent: "dropdown-select-box/dropdown-select-box-header",
|
headerComponent: "dropdown-select-box/dropdown-select-box-header",
|
||||||
rowComponent: "dropdown-select-box/dropdown-select-box-row",
|
rowComponent: "dropdown-select-box/dropdown-select-box-row",
|
||||||
|
|
||||||
clickOutside() { this.close(); },
|
clickOutside() {
|
||||||
|
if (this.get("isExpanded") === false) { return; }
|
||||||
|
this.close();
|
||||||
|
},
|
||||||
|
|
||||||
didSelectValue() {
|
didSelectValue() {
|
||||||
this._super();
|
this._super();
|
||||||
|
|
|
@ -175,13 +175,14 @@ export default Ember.Mixin.create({
|
||||||
},
|
},
|
||||||
|
|
||||||
_applyFixedPosition() {
|
_applyFixedPosition() {
|
||||||
|
if (this.get("isExpanded") !== true) { return; }
|
||||||
if (this.get("scrollableParent").length === 0) { return; }
|
if (this.get("scrollableParent").length === 0) { return; }
|
||||||
|
|
||||||
const width = this.$().outerWidth(false);
|
const width = this.$().outerWidth(false);
|
||||||
const height = this.$().outerHeight(false);
|
const height = this.$().outerHeight(false);
|
||||||
const $placeholder = $(`<div class='select-box-kit-fixed-placeholder-${this.elementId}'></div>`);
|
const $placeholder = $(`<div class='select-box-kit-fixed-placeholder-${this.elementId}'></div>`);
|
||||||
|
|
||||||
this._previousScrollParentOverflow = this.get("scrollableParent").css("overflow");
|
this._previousScrollParentOverflow = this._previousScrollParentOverflow || this.get("scrollableParent").css("overflow");
|
||||||
this.get("scrollableParent").css({ overflow: "hidden" });
|
this.get("scrollableParent").css({ overflow: "hidden" });
|
||||||
|
|
||||||
this._previousCSSContext = {
|
this._previousCSSContext = {
|
||||||
|
|
Loading…
Reference in New Issue