Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

browser(firefox): pass drag action test (#5560)

Joel Einbindere677e7ba4e7c
diff --git a/browser_patches/firefox/BUILD_NUMBER b/browser_patches/firefox/BUILD_NUMBER
index a797701506..7bc62596a5 100644
--- a/browser_patches/firefox/BUILD_NUMBER
+++ b/browser_patches/firefox/BUILD_NUMBER
@@ -1,2 +1,2 @@
-1234
-Changed: [email protected] Fri 19 Feb 2021 21:20:12 PM PST
+1235
+Changed: [email protected] Mon 22 Feb 2021 09:28:46 PM PST
diff --git a/browser_patches/firefox/juggler/content/PageAgent.js b/browser_patches/firefox/juggler/content/PageAgent.js
index 4501d426bb..14345d9711 100644
--- a/browser_patches/firefox/juggler/content/PageAgent.js
+++ b/browser_patches/firefox/juggler/content/PageAgent.js
@@ -819,10 +819,10 @@ class PageAgent {
null /* relatedTarget */,
dragService.getCurrentSession().dataTransfer.mozCloneForEvent(type)
);
-
- window.windowUtils.dispatchDOMEventViaPresShellForTesting(element, event);
+ if (type !== 'drop' || dragService.dragAction)
+ window.windowUtils.dispatchDOMEventViaPresShellForTesting(element, event);
if (type === 'drop')
- dragService.endDragSession(true);
+ this._cancelDragIfNeeded();
}
_cancelDragIfNeeded() {