Skip to content

Commit

Permalink
Improve support for actions involving multiple navigables
Browse files Browse the repository at this point in the history
This makes the following changes:

* Actions are always dispatched first to the top-level traversable
rather than directly to the target navigable. It is assumed that the
action will end up interacting with the target traversable, but may
not e.g. if there is an element obscuring the target, or the focus is
in the wrong place.

* To support the above, coordinates are computed relative to the
viewport of the top-level traversable rather than the target
navigable.

* A new coordinate origin type is introduced which has the form:
  ```
  {
    type: "viewport",
    context: <context id>
  }
  ```

  This is designed to allow targeting inside a specific iframe without
  that iframe needing to be the target of the overall actions chain.

The existing behaviour that if the main target navigable is deleted
the action chain is terminated remains. This makes the behaviour
consistent between top-level traversables and iframes, and also
between different actions.
  • Loading branch information
jgraham committed Jan 7, 2025
1 parent 9cb696c commit 1866cff
Showing 1 changed file with 125 additions and 55 deletions.
Loading

0 comments on commit 1866cff

Please sign in to comment.