mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibWeb: Add support for handling drag-and-drop events of DOM elements
This allows dragging elements on the page and dropping them onto other elements. This does not yet support dragging text. The test added here is manual; the WPT tests rely heavily on WebDriver actions.
This commit is contained in:
Notes:
github-actions[bot]
2026-04-05 15:35:41 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/cfe7ddc8058 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8783
40
Tests/LibWeb/Text/expected/HTML/drag-and-drop-element.txt
Normal file
40
Tests/LibWeb/Text/expected/HTML/drag-and-drop-element.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
Drag div:
|
||||
dragenter
|
||||
types: text/plain
|
||||
dragover
|
||||
types: text/plain
|
||||
drop
|
||||
types: text/plain
|
||||
text/plain: 'hello'
|
||||
text/uri-list: ''
|
||||
source events: dragstart,dragend:copy
|
||||
|
||||
Drag non-draggable div:
|
||||
drag started: false
|
||||
|
||||
Drag link:
|
||||
dragstart
|
||||
types: text/uri-list
|
||||
dragenter
|
||||
types: text/uri-list
|
||||
dragover
|
||||
types: text/uri-list
|
||||
drop
|
||||
types: text/uri-list
|
||||
text/plain: ''
|
||||
text/uri-list: 'https://example.com/'
|
||||
|
||||
Drag image:
|
||||
dragstart
|
||||
types: text/uri-list
|
||||
dragenter
|
||||
types: text/uri-list
|
||||
dragover
|
||||
types: text/uri-list
|
||||
drop
|
||||
types: text/uri-list
|
||||
text/plain: ''
|
||||
text/uri-list: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR4nGP4z8DwHwAFAAH/iZk9HQAAAABJRU5ErkJggg=='
|
||||
|
||||
Dragstart cancelled:
|
||||
dragstart (cancelling)
|
||||
Reference in New Issue
Block a user