Skip to content

Commit a18cc82

Browse files
petermetzalsorokin
authored andcommitted
CB-11488 (browser) The hide() call became non re-entrant after the addition of fade out. This fixes the issue.
1 parent bf9607e commit a18cc82

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/browser/SplashScreenProxy.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,19 @@ var SplashScreen = {
8181
},
8282
hide: function () {
8383
if(localSplash) {
84+
var innerLocalSplash = localSplash;
85+
localSplash = null;
8486
window.removeEventListener("resize", onResize, false);
8587

86-
localSplash.style.opacity = '0';
87-
localSplash.style["-webkit-transition"] = "opacity 1s ease-in-out";
88-
localSplash.style["-moz-transition"] = "opacity 1s ease-in-out";
89-
localSplash.style["-ms-transition"] = "opacity 1s ease-in-out";
90-
localSplash.style["-o-transition"] = "opacity 1s ease-in-out";
88+
innerLocalSplash.style.opacity = '0';
89+
innerLocalSplash.style["-webkit-transition"] = "opacity 1s ease-in-out";
90+
innerLocalSplash.style["-moz-transition"] = "opacity 1s ease-in-out";
91+
innerLocalSplash.style["-ms-transition"] = "opacity 1s ease-in-out";
92+
innerLocalSplash.style["-o-transition"] = "opacity 1s ease-in-out";
9193

9294
window.setTimeout(function () {
93-
document.body.removeChild(localSplash);
94-
localSplash = null;
95+
document.body.removeChild(innerLocalSplash);
96+
innerLocalSplash = null;
9597
}, 1000);
9698

9799

0 commit comments

Comments
 (0)