Problem
Cuprite has no working HTML5 native drag-and-drop. The existing Node#drag_to (browser.rb) drives real mouse events (move/down/move/up), which works for pointer-based dragging but never fires the HTML5 DnD event sequence (dragstart/dragover/drop/dragend + DataTransfer). Chrome does not synthesize those from raw mouse input.
Consequence: suites that exercise HTML5 DnD must fall back to Selenium (e.g. opf/openproject#23218).
Currently skipped
spec/spec_helper.rb force-skips ~15 Capybara shared specs from node_spec.rb #drag_to:
- 12 under
#drag_to HTML5 — native DnD, incl. clientX/Y in dragover, preserve-last-coords, scrolling, SortableJS, default-draggable elements
- 3 under
#drag_to — mouse drag with held drop_modifiers (single/multiple keys, key aliases)
Scope (first pass)
- HTML5
drag_to + drop_modifiers on the mouse path — the 15 specs above
Element#drop (files/strings/pathname, 5 specs) tracked separately — different method + file-input plumbing
- Detailed approach left to the PR
Direction (non-binding)
Port Capybara's Selenium Html5Drag JS emulation as the near-term path (parity with what downstream suites already validate against); revisit CDP-native drag (Input.setInterceptDrags + dispatchDragEvent, Playwright's approach) once Ferrum exposes a public drag API.
Part of #307.
🤖 Drafted with agent assistance.
Problem
Cuprite has no working HTML5 native drag-and-drop. The existing
Node#drag_to(browser.rb) drives real mouse events (move/down/move/up), which works for pointer-based dragging but never fires the HTML5 DnD event sequence (dragstart/dragover/drop/dragend+DataTransfer). Chrome does not synthesize those from raw mouse input.Consequence: suites that exercise HTML5 DnD must fall back to Selenium (e.g. opf/openproject#23218).
Currently skipped
spec/spec_helper.rbforce-skips ~15 Capybara shared specs fromnode_spec.rb#drag_to:#drag_to HTML5— native DnD, incl.clientX/Y in dragover, preserve-last-coords, scrolling, SortableJS, default-draggable elements#drag_to— mouse drag with helddrop_modifiers(single/multiple keys, key aliases)Scope (first pass)
drag_to+drop_modifierson the mouse path — the 15 specs aboveElement#drop(files/strings/pathname, 5 specs) tracked separately — different method + file-input plumbingDirection (non-binding)
Port Capybara's Selenium
Html5DragJS emulation as the near-term path (parity with what downstream suites already validate against); revisit CDP-native drag (Input.setInterceptDrags+dispatchDragEvent, Playwright's approach) once Ferrum exposes a public drag API.Part of #307.
🤖 Drafted with agent assistance.