From 632abe12ece6b82115f30e6b5730038b1e79581e Mon Sep 17 00:00:00 2001 From: Brendan Davis Date: Thu, 23 Nov 2017 09:10:36 -0500 Subject: [PATCH] fix(dropdown): bootstrap 4 dropup fix in IE11 (#3057) The inline style on the element is top: auto, this fix is for cross browser support. Fixes #3054 --- src/dropdown/bs-dropdown.directive.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/dropdown/bs-dropdown.directive.ts b/src/dropdown/bs-dropdown.directive.ts index 8fed779cf3..634676bae1 100644 --- a/src/dropdown/bs-dropdown.directive.ts +++ b/src/dropdown/bs-dropdown.directive.ts @@ -318,8 +318,6 @@ export class BsDropdownDirective implements OnInit, OnDestroy { private checkDropup(): void { if (this._inlinedMenu && this._inlinedMenu.rootNodes[0]) { // a little hack to not break support of bootstrap 4 beta - const top = getComputedStyle(this._inlinedMenu.rootNodes[0]).top; - const topAuto = top === 'auto' || top === '100%'; this._renderer.setStyle( this._inlinedMenu.rootNodes[0], 'top', @@ -328,7 +326,7 @@ export class BsDropdownDirective implements OnInit, OnDestroy { this._renderer.setStyle( this._inlinedMenu.rootNodes[0], 'transform', - this.dropup && !topAuto ? 'translateY(-101%)' : 'translateY(0)' + this.dropup ? 'translateY(-101%)' : 'translateY(0)' ); } }