From: liwei Date: Thu, 1 Apr 2021 05:26:55 +0000 (+0800) Subject: Fix issue in multi view(window) scenario X-Git-Tag: submit/tizen/20210512.160020~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab17ff17c22bdacdd7948d33f57b6024cb37613e;p=platform%2Fframework%2Fweb%2Fwrtjs.git Fix issue in multi view(window) scenario This patch fix issue when app use "window.open("***.html")". ex. newpage = window.open ('page.html', 'page', 'height=100, width=800, top=100, left=100') If main window's "ready to show" event is invoked after newpage create("browser-window-created" event), WRT need show the latest view(window) in window list. Native Patch: https://review.tizen.org/gerrit/257970/ Change-Id: I4c5c5b7930de4509cda52a8a8147de0b36d57f97 Signed-off-by: liwei --- diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts index f2e3d1a5..fc4b51e4 100644 --- a/wrt_app/src/web_application.ts +++ b/wrt_app/src/web_application.ts @@ -367,8 +367,11 @@ export class WebApplication { if (this.profileDelegate.backgroundExecutable()) { console.log('skip showing while backgroundExecution mode'); } else if (!this.mainWindow.isVisible()) { - console.log('show window'); + console.log(`show this.windowList.length : ${this.windowList.length}`); this.mainWindow.show(); + if (this.windowList.length > 1) { + this.windowList[this.windowList.length - 1].moveTop(); + } } this.profileDelegate.show(); }