From: SangYong Park Date: Fri, 22 Nov 2019 08:17:58 +0000 (+0900) Subject: Fix the issue that OnPause function is called after showing splash image X-Git-Tag: submit/tizen/20191205.004241^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6598bb763862a498bdf9c74ae47f2c113545fdaf;p=platform%2Fframework%2Fweb%2Fwrtjs.git Fix the issue that OnPause function is called after showing splash image Call showSplashScreen exclicity during create main browser window. (prevent showTimer if splash screen is applied.) and fix hideSplashScreen parameter offset. Change-Id: Ia063d72c9de953321c2263935220aaf83878bdc1 Signed-off-by: SangYong Park --- diff --git a/wrt_app/src/web_application.js b/wrt_app/src/web_application.js index fc381411..c3af1857 100755 --- a/wrt_app/src/web_application.js +++ b/wrt_app/src/web_application.js @@ -249,7 +249,7 @@ class WebApplication { }); } let self = this; - if (!wrt.tv) { + if (!wrt.showSplashScreen() && !wrt.tv) { self.showTimer = setTimeout(() => { if (!self.suspended) { console.log('FrameRendered not obtained from engine. To show window, timer fired'); @@ -262,7 +262,7 @@ class WebApplication { console.log('mainWindow ready-to-show'); if (self.showTimer) clearTimeout(self.showTimer); - wrt.hideSplashScreen(1); + wrt.hideSplashScreen(0); self.firstRendered = true; if (self.preloadStatus == 'preload') { self.preloadStatus = 'readyToShow'; @@ -278,7 +278,7 @@ class WebApplication { this.mainWindow.webContents.on('did-finish-load', function() { console.log('webContents did-finish-load'); self.loadFinished = true; - wrt.hideSplashScreen(2); + wrt.hideSplashScreen(1); if (wrt.isIMEWebApp()) { self.activateIMEWebHelperClient(); } else if (wrt.tv) {