Skip to content

Commit 83c2ba3

Browse files
committed
Merge pull request usablica#274 from raahede/hotfix-transform-zindex
Fixing z-index issue (when parent elements have css transform applied)
2 parents 8b03565 + 545b8e8 commit 83c2ba3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

intro.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,8 @@
736736
//More detail: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Understanding_z_index/The_stacking_context
737737
var zIndex = _getPropValue(parentElm, 'z-index');
738738
var opacity = parseFloat(_getPropValue(parentElm, 'opacity'));
739-
if (/[0-9]+/.test(zIndex) || opacity < 1) {
739+
var transform = _getPropValue(parentElm, 'transform') || _getPropValue(parentElm, '-webkit-transform') || _getPropValue(parentElm, '-moz-transform') || _getPropValue(parentElm, '-ms-transform') || _getPropValue(parentElm, '-o-transform');
740+
if (/[0-9]+/.test(zIndex) || opacity < 1 || transform !== 'none') {
740741
parentElm.className += ' introjs-fixParent';
741742
}
742743

introjs.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
.introjs-fixParent {
2323
z-index: auto !important;
2424
opacity: 1.0 !important;
25+
-webkit-transform: none !important;
26+
-moz-transform: none !important;
27+
-ms-transform: none !important;
28+
-o-transform: none !important;
29+
transform: none !important;
2530
}
2631

2732
.introjs-showElement,

0 commit comments

Comments
 (0)