From: liwei Date: Wed, 24 Mar 2021 07:14:22 +0000 (+0800) Subject: fixup!Minor refactor logic of quit for non-multitasking app X-Git-Tag: submit/tizen/20210324.231941^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18393158881ea5096d867653894732be0d7bc4a2;p=platform%2Fframework%2Fweb%2Fwrtjs.git fixup!Minor refactor logic of quit for non-multitasking app If app is backgroundsupport, window cannot be set to false. Change-Id: I30a7885cb4013257beffab4c95eb10b5fa7a5379 Signed-off-by: liwei --- diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts index 9d782c7..7fa658e 100644 --- a/wrt_app/src/web_application.ts +++ b/wrt_app/src/web_application.ts @@ -411,12 +411,14 @@ Then you can get profile log from the initial loading.`; this.suspended = true; this.windowList[this.windowList.length - 1].hide(); this.flushData(); - this.windowList.forEach((window) => window.setEnabled(false)); - if (!this.backgroundRunnable() && !this.multitaskingSupport) { - setTimeout(() => { - console.log('multitasking is not supported; quitting app') - app.quit(); - }, 0); + if (!this.backgroundRunnable()) { + this.windowList.forEach((window) => window.setEnabled(false)); + if (!this.multitaskingSupport) { + setTimeout(() => { + console.log('multitasking is not supported; quitting app') + app.quit(); + }, 0); + } } }