playwright/packages/playwright-core/src
Dmitry Gozman 61ff52704c
feat(input): perform hit target check during input (#9546)
This replaces previous `checkHitTarget` heuristic that took place before the action
with a new `setupHitTargetInterceptor` that works during the action:
- Before the action we set up capturing listeners on the window.
- During the action we ensure that event target is the element we expect to interact with.
- After the action we clear the listeners.

This should catch the "layout shift" issues where things move
between action point calculation and the actual action.

Possible issues:
- **Risk:** `{ trial: true }` might dispatch move events like `mousemove` or `pointerout`,
because we do actually move the mouse but prevent all other events.
- **Timing**: The timing of "hit target check" has moved, so this may affect different web pages
in different ways, for example expose more races. In this case, we should retry the click as before.
- **No risk**: There is still a possibility of mis-targeting with iframes shifting around,
because we only intercept in the target frame. This behavior does not change.

There is an opt-out environment variable PLAYWRIGHT_NO_LAYOUT_SHIFT_CHECK that reverts to previous behavior.
2021-11-05 17:31:28 -07:00
..
cli feat(html): render warning message when served off file:// (#9908) 2021-10-31 17:36:05 -07:00
client chore: rename Fetch Request/Response to API (#10087) 2021-11-05 16:27:49 +01:00
common chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
dispatchers feat(iframe): make iframe selectors work w/ element handles (#10063) 2021-11-05 11:06:04 -07:00
grid chore: fix race in grid server (#9999) 2021-11-02 18:01:15 -07:00
protocol chore: rename Fetch Request/Response to API (#10087) 2021-11-05 16:27:49 +01:00
remote chore: merge Connection.{close,didDisconnect} (#9524) 2021-10-14 20:58:09 -07:00
server feat(input): perform hit target check during input (#9546) 2021-11-05 17:31:28 -07:00
third_party/highlightjs chore: move diff_match_patch into the test package (#9475) 2021-10-13 13:38:26 -07:00
utils feat: support Firefox for Ubuntu 20.04 arm64 download (#10100) 2021-11-05 17:02:48 -07:00
web feat(trace-viewer): render snapshot urls (#9993) 2021-11-02 17:35:23 -07:00
.eslintrc.js chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
browserServerImpl.ts chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
inprocess.ts chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
inProcessFactory.ts chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
nativeDeps.ts chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
outofprocess.ts chore: sort out base fixtures (#9809) 2021-10-27 08:28:53 -07:00