bm-core-ui 2.11.9-beta.1 → 2.11.9-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -806,11 +806,24 @@ BMPopover.prototype = BMExtend(Object.create(BMWindow.prototype), {
|
|
|
806
806
|
};
|
|
807
807
|
BMCopyProperties(this.contentNode.style, positionStyle);
|
|
808
808
|
|
|
809
|
+
const popoverDarkModeFill = this._background.querySelector('.BMPopoverBackgroundDarkModeFill');
|
|
810
|
+
|
|
811
|
+
// Safari requires a forced style recalculation for the drop shadow and dark mode fill during animations
|
|
812
|
+
if (BMPopover._requiresClipPathReflow) {
|
|
813
|
+
popoverDarkModeFill.style.clipPath = 'none';
|
|
814
|
+
popoverDarkModeFill.style.webkitClipPath = 'none';
|
|
815
|
+
this._dropShadowContent.style.clipPath = 'none';
|
|
816
|
+
this._dropShadowContent.style.webkitClipPath = 'none';
|
|
817
|
+
|
|
818
|
+
// These trigger a forced reflow
|
|
819
|
+
popoverDarkModeFill.offsetWidth;
|
|
820
|
+
this._dropShadowContainer.offsetWidth;
|
|
821
|
+
}
|
|
822
|
+
|
|
809
823
|
BMCopyProperties(this._background.style, positionStyle);
|
|
810
824
|
this._background.style.clipPath = path;
|
|
811
825
|
this._background.style.webkitClipPath = path;
|
|
812
826
|
|
|
813
|
-
const popoverDarkModeFill = this._background.querySelector('.BMPopoverBackgroundDarkModeFill');
|
|
814
827
|
popoverDarkModeFill.style.clipPath = outlinePath;
|
|
815
828
|
popoverDarkModeFill.style.webkitClipPath = outlinePath;
|
|
816
829
|
|
|
@@ -1292,4 +1305,7 @@ BMPopover.setRetainsDirection = function (retains) {
|
|
|
1292
1305
|
BMPopover._retainsDirection = retains || NO;
|
|
1293
1306
|
}
|
|
1294
1307
|
|
|
1308
|
+
// Set to YES for safari, which requires a reflow when the clip path is updated on some of the popover components
|
|
1309
|
+
BMPopover._requiresClipPathReflow = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
1310
|
+
|
|
1295
1311
|
// @endtype
|