mirror of
https://github.com/kamranahmedse/driver.js.git
synced 2026-11-02 22:17:14 +08:00
Fix - Stacking context gets disturbed
This commit is contained in:
@@ -247,6 +247,8 @@ export default class Element {
|
||||
const zIndex = getStyleProperty(parentNode, 'z-index');
|
||||
const opacity = parseFloat(getStyleProperty(parentNode, 'opacity'));
|
||||
const transform = getStyleProperty(parentNode, 'transform', true);
|
||||
const transformStyle = getStyleProperty(parentNode, 'transform-style', true);
|
||||
const transformBox = getStyleProperty(parentNode, 'transform-box', true);
|
||||
const filter = getStyleProperty(parentNode, 'filter', true);
|
||||
const perspective = getStyleProperty(parentNode, 'perspective', true);
|
||||
|
||||
@@ -258,6 +260,8 @@ export default class Element {
|
||||
/[0-9]+/.test(zIndex) ||
|
||||
opacity < 1 ||
|
||||
(transform && transform !== 'none') ||
|
||||
(transformStyle && transformStyle !== 'flat') ||
|
||||
(transformBox && transformBox !== 'border-box') ||
|
||||
(filter && filter !== 'none') ||
|
||||
(perspective && perspective !== 'none')
|
||||
) {
|
||||
|
||||
+9
-3
@@ -182,22 +182,28 @@ div#driver-highlighted-element-stage {
|
||||
.driver-fix-stacking {
|
||||
z-index: auto !important;
|
||||
opacity: 1.0 !important;
|
||||
|
||||
-webkit-transform: none !important;
|
||||
-moz-transform: none !important;
|
||||
-ms-transform: none !important;
|
||||
-o-transform: none !important;
|
||||
transform: none !important;
|
||||
|
||||
-webkit-filter: none !important;
|
||||
-moz-filter: none !important;
|
||||
-ms-filter: none !important;
|
||||
-o-filter: none !important;
|
||||
filter: none !important;
|
||||
|
||||
-webkit-perspective: none !important;
|
||||
-moz-perspective: none !important;
|
||||
-ms-perspective: none !important;
|
||||
-o-perspective: none !important;
|
||||
perspective: none !important;
|
||||
-webkit-transform-style: flat !important;
|
||||
-moz-transform-style: flat !important;
|
||||
-ms-transform-style: flat !important;
|
||||
transform-style: flat !important;
|
||||
-webkit-transform-box: border-box !important;
|
||||
-moz-transform-box: border-box !important;
|
||||
-ms-transform-box: border-box !important;
|
||||
-o-transform-box: border-box !important;
|
||||
transform-box: border-box !important;
|
||||
}
|
||||
Reference in New Issue
Block a user