Make sure we focus inner iframe contents if the webview itself is already focused
This commit is contained in:
parent
a0e0324a8d
commit
647a4b044a
1 changed files with 4 additions and 0 deletions
|
@ -591,6 +591,10 @@
|
|||
contentWindow.addEventListener('scroll', handleInnerScroll);
|
||||
contentWindow.addEventListener('wheel', handleWheel);
|
||||
|
||||
if (document.hasFocus()) {
|
||||
contentWindow.focus();
|
||||
}
|
||||
|
||||
pendingMessages.forEach((data) => {
|
||||
contentWindow.postMessage(data, '*');
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue