mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
browser(firefox): pass null for the data transfer (#5723)
This commit is contained in:
parent
8ffcbb3808
commit
e56f56c11e
@ -1,2 +1,2 @@
|
|||||||
1236
|
1237
|
||||||
Changed: lushnikov@chromium.org Tue 02 Mar 2021 06:38:43 PM PST
|
Changed: joel.einbinder@gmail.com Thu 04 Mar 2021 05:16:38 PM PST
|
||||||
|
|||||||
@ -790,8 +790,6 @@ class PageAgent {
|
|||||||
const element = window.windowUtils.elementFromPoint(x, y, false, false);
|
const element = window.windowUtils.elementFromPoint(x, y, false, false);
|
||||||
const event = window.document.createEvent('DragEvent');
|
const event = window.document.createEvent('DragEvent');
|
||||||
|
|
||||||
const dataTransfer = dragService.getCurrentSession().dataTransfer.mozCloneForEvent(type);
|
|
||||||
dataTransfer.dropEffect = 'move';
|
|
||||||
event.initDragEvent(
|
event.initDragEvent(
|
||||||
type,
|
type,
|
||||||
true /* bubble */,
|
true /* bubble */,
|
||||||
@ -808,7 +806,7 @@ class PageAgent {
|
|||||||
modifiers & 8 /* metaKey */,
|
modifiers & 8 /* metaKey */,
|
||||||
0 /* button */, // firefox always has the button as 0 on drops, regardless of which was pressed
|
0 /* button */, // firefox always has the button as 0 on drops, regardless of which was pressed
|
||||||
null /* relatedTarget */,
|
null /* relatedTarget */,
|
||||||
dataTransfer,
|
null,
|
||||||
);
|
);
|
||||||
if (type !== 'drop' || dragService.dragAction)
|
if (type !== 'drop' || dragService.dragAction)
|
||||||
window.windowUtils.dispatchDOMEventViaPresShellForTesting(element, event);
|
window.windowUtils.dispatchDOMEventViaPresShellForTesting(element, event);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user