w3c / w3c/webdriver

Clarify "dispatch action chain" behavior when executed within a frame

Open
#1,840 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-discussion Perform Actions Release Actions
Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

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:

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.

I noticed that issue when trying to fix some wpt tests around input events (see https://github.com/web-platform-tests/wpt/pull/48147).

I also landed a test which demonstrates the difference in behavior:
https://github.com/web-platform-tests/wpt/pull/48123

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the issue's comparison of Firefox, Chrome, and Safari behavior and the linked MDN VisualViewport definition. Review web-platform-tests PRs 48147 and 48123 to understand the demonstrated iframe behavior, then clarify the WebDriver specification so the expected dispatch action chain behavior is explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.