From ab17ff17c22bdacdd7948d33f57b6024cb37613e Mon Sep 17 00:00:00 2001 From: liwei Date: Thu, 1 Apr 2021 13:26:55 +0800 Subject: [PATCH] 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 --- wrt_app/src/web_application.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts index f2e3d1a..fc4b51e 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(); } -- 2.7.4