Here we fix the problem with not opening the extension Popup when an Iframe with Same-origin policy restrictions contains a focused element.
The extension was trying to get the focused element in the Iframe to restore the focus after the Popup is closed. However, the Iframe was not accessible due to the Same-origin policy restrictions which caused an error and prevented the Popup from opening.
Changes:
Add e2e test that checks fallback to the current window in case of the Same-origin policy restrictions.
Handle errors in SelectionAndFocus.getActiveWindow method. In case it faces Same-origin policy restrictions, it should return the current window.
Here we fix the problem with not opening the extension Popup when an Iframe with Same-origin policy restrictions contains a focused element. The extension was trying to get the focused element in the Iframe to restore the focus after the Popup is closed. However, the Iframe was not accessible due to the Same-origin policy restrictions which caused an error and prevented the Popup from opening.
Changes: