I have a website where a popup window is opened by:
// main window
const url = ...
const popup = window.open(url, "popup_workflow", "popup=yes")
And I rely on popup_workflow window's opener to communicate workflow result.
// popup_workflow window
const result = ...
window.opener.postMessage(result , "*")
This workflow works in most browser, only breaks on an iPad when:
- Open the
popup_workflowwindow in safari. - Drag the tab of
popup_workflowwindow to edge of iPad screen, open it in split view. - Now in the new
popup_workflowwindow,window.openeris gone.
// in main window, this does not work
popup.postMessage("something", "*")
// in popup_workflow window, this does not work
window.opener.postMessage("something", "*")
While I test in other OS or browser, window.opener will not lost even after refresh.
How could I get my opener back in iOS safari's split screen view?