playwright/packages/playwright-core
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
..
bin chore: bail out stable installation when running on Linux Arm64 (#9991) 2021-11-02 16:01:30 -07:00
src feat(input): perform hit target check during input (#9546) 2021-11-05 17:31:28 -07:00
types fix(fetch): post data for delete request (#10019) 2021-11-03 13:26:15 -07:00
.npmignore chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
browsers.json feat(firefox-beta): roll to r1303 (#10065) 2021-11-05 12:33:20 -07:00
cli.js chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
index.d.ts chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
index.js chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
index.mjs chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
package.json fix(monorepo): export package.json from every package (#9803) 2021-10-26 18:41:18 -04:00
README.md chore: drop dependency on playwright-core in all our packages (#2318) 2020-05-21 13:18:15 -07:00

playwright-core

This package contains the no-browser flavor of Playwright.