-
-
Notifications
You must be signed in to change notification settings - Fork 359
Description
Describe the bug
- On Windows, navigating inside an iframe doesn't activate the navigation handler or the new window request handler.
- On macOS, navigating inside an iframe activates the new window request handler.
- On Linux (Ubuntu), navigating inside an iframe activates the navigation handler.
Steps To Reproduce
Run https://github.com/jf908/wry-iframe-test
and see the different console output when run on Windows, macOS and Ubuntu.
Expected behavior
Each OS should have the same behaviour and ideally it should be detectable whether the navigation is occuring inside the iframe or not.
Platform and Versions (please complete the following information):
OS: Windows 11 23H2, macOS 15.5, Ubuntu 24.04
Rustc: 1.88.0
Additional context
On Windows I'm using the navigation handler and the new window request handler to intercept and externally open URLs outside of my wry app where I need to but I cannot do the same on macOS/Linux because ad scripts often inject a navigating iframe which fires off these events so you cannot tell the difference between the user intentionally navigating and a random iframe that is changing URL.