Browser plugin: successive Locator::dragTo ends before drop in WebKit
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 11.7k
- Forks
- 538
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 8
Description
Description
In WebKit, a second HTML5 drag driven through Pest\Browser\Playwright\Locator::dragTo() can terminate before the
drop target receives any native drag event. The same product journey succeeds when driven through Playwright's Page mouse
channel with ordinary mouseMove / mouseDown / intermediate mouseMove / mouseUp events.
This appears after one successful drag, followed by opening a dialog and dragging a source from that dialog onto the same
canvas. The application uses Atlassian Pragmatic Drag and Drop, but its registrations remain live and the source/target
remain attached. Event telemetry for the failing second dragTo() shows dragstart followed by dragend, with no target
entry or drop. Replacing only the input driver with raw mouse events produces dragstart, drop, and dragend and the
unchanged product assertions pass.
Reproduction shape
- Drag a visible sidebar source onto a registered canvas target with
Locator::dragTo(). - Open a dialog containing another draggable source.
- Drag that dialog source onto the canvas with
Locator::dragTo(). - Record
dragstart, targetdragenter/dragover,drop, anddragend.
On WebKit, step 3 ends before target entry. A bounded sequence through the underlying Page mouse channel succeeds:
$send('mouseMove', ['x' => $sourceX, 'y' => $sourceY]);
$send('mouseDown', ['button' => 'left', 'clickCount' => 1]);
$send('mouseMove', ['x' => $sourceX + 5, 'y' => $sourceY + 5]);
foreach (range(1, 20) as $step) {
$progress = $step / 20;
$send('mouseMove', [
'x' => $sourceX + (($targetX - $sourceX) * $progress),
'y' => $sourceY + (($targetY - $sourceY) * $progress),
]);
}
$send('mouseUp', ['button' => 'left', 'clickCount' => 1]);
No force option is needed for the raw-mouse path. We fully consume the protocol generator after every command.
Expected behaviour
Locator::dragTo() should drive the same native drag lifecycle as a real pointer for successive WebKit drags, including
when the second source is inside a dialog.
If that cannot be guaranteed by the locator abstraction, a supported public mouse API on AwaitableWebpage/Page would
allow browser tests to express this journey without binding to Pest's internal Playwright client and Page GUID.
Environment
pestphp/pest-plugin-browser4.3.1- Playwright 1.61.1
- macOS 26.5.2
- Pest browser
--browser safari(Playwright WebKit)
The unchanged raw-mouse journey also passes in Chromium and Firefox, which we use as controls.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Pest\Browser\Playwright\Locator::dragTo() and the underlying AwaitableWebpage/Page mouse channel, then reproduce the two-drag WebKit sequence while recording the listed drag events. Compare the locator path with the bounded mouseMove/mouseDown/mouseUp path. Done means the second drag reaches the target and emits drop, or a supported public mouse API enables the successful path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, playwright
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100