You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is currently a difference between Firefox and Chrome / Safari when actions are performed within an iframe. While Firefox uses the iframe's visual viewport as reference to dispatch the actions, the top-level browsing context's visible viewport is actually used by Chrome and Safari.
The VisualViewport interface of the Visual Viewport API represents the visual viewport for a given window. For a page containing iframes, each iframe, as well as the containing page, will have a unique window object. Each window on a page will have a unique VisualViewport representing the properties associated with that window.
IMO this means that we do it right in Firefox, but it's not clear given that the specification is quite unclear.
This issue is not about the coordinates, but rather about the origin of the event, right?
The coordinates for the clicks depend on the browsing context you are actually executing the action in. If the frame has a border and some margin the coordinates will be different when dispatching the events in the TLBC or the current BC.
Nevertheless the important part is that the action chain needs to be able to get the coordinates of a referenced web element as origin from the appropriate browsing context. When we can get this spec'ed we probably should be fine in dispatching the action chain from the TLBC.
So this is the identical topic as now discussed on #795 for WebDriver BiDi.
The current PR to get this behavior changed is #1847.
@sadym-chromium lets see if we are in sync. So when a mouse move event is synthesized to point 100x100 within a frame, the resulting mousemove event as fired by the browser within that frame should have the exact same coordinates. Right now this is (or was) not the case with Chrome and there is a difference based on the frame's outer margin etc.
There is currently a difference between Firefox and Chrome / Safari when actions are performed within an
iframe
. While Firefox uses the iframe's visual viewport as reference to dispatch the actions, the top-level browsing context's visible viewport is actually used by Chrome and Safari.As per definition of the visual viewport on MDN:
IMO this means that we do it right in Firefox, but it's not clear given that the specification is quite unclear.
I noticed that issue when trying to fix some wpt tests around input events (see web-platform-tests/wpt#48147).
I also landed a test which demonstrates the difference in behavior:
web-platform-tests/wpt#48123
The text was updated successfully, but these errors were encountered: