mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
browser(firefox): force a layout before dispatching a tap (#4428)
This commit is contained in:
parent
31bebc7ea0
commit
e91140e88c
@ -1,2 +1,2 @@
|
|||||||
1208
|
1209
|
||||||
Changed: yurys@chromium.org Fri 13 Nov 2020 02:55:31 PM PST
|
Changed: joel.einbinder@gmail.com Mon 16 Nov 2020 10:52:59 AM PST
|
||||||
|
@ -715,6 +715,14 @@ class PageAgent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async _dispatchTapEvent({x, y, modifiers}) {
|
async _dispatchTapEvent({x, y, modifiers}) {
|
||||||
|
// Force a layout at the point in question, because touch events
|
||||||
|
// do not seem to trigger one like mouse events.
|
||||||
|
this._frameTree.mainFrame().domWindow().windowUtils.elementFromPoint(
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
false /* aIgnoreRootScrollFrame */,
|
||||||
|
true /* aFlushLayout */);
|
||||||
|
|
||||||
const {defaultPrevented: startPrevented} = await this._dispatchTouchEvent({
|
const {defaultPrevented: startPrevented} = await this._dispatchTouchEvent({
|
||||||
type: 'touchstart',
|
type: 'touchstart',
|
||||||
modifiers,
|
modifiers,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user