After closed another WRTWindow, the last web contents has no focus
until any registered key is handled.
This patch will give focus on the last web contents when WRTWindow
closed.
Related patch:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/264955/
Change-Id: I43475272f757a05be05aa51ca7ff5dbac659bf6b
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
canIgnoreSuspend() { return false; }
clearCache() { }
clearSuface(webContents: any) { }
+ focus(webContents: any) { }
handleAppControlEvent(appControl: any) { return true; }
handleProxyInfo(authInfo: any, callback: any) { return false; }
initialize(options: RuntimeOption) { }
profileName() {
return 'TV';
}
+
+ focus(webContents: any) {
+ this.tv.focus(webContents);
+ }
}
console.log(`window closed : #${this.windowList.length}`);
let index = this.windowList.indexOf(window);
this.windowList.splice(index, 1);
- if (!this.inQuit && index === this.windowList.length && this.windowList.length > 0)
- this.windowList[this.windowList.length - 1].show();
+ if (!this.inQuit && index === this.windowList.length && this.windowList.length > 0) {
+ let lastWindow = this.windowList[this.windowList.length - 1];
+ lastWindow.show();
+ this.profileDelegate.focus(lastWindow.webContents);
+ }
});
});