Page MenuHomePhabricator

Dragging an element to the top of the VisualEditor viewport does not scroll the document in all browsers.
Open, LowPublic

Description

Select an element, like a image or a range of text, from a VisualEditor surface and drag. Drag it to the top or bottom of the VE viewport (that it, to the bottom edge of the toolbar or the bottom edge of the browser window). This causes the VE document to scroll up or down in Chrome, but it does nothing in either Firefox or Safari.

Almost all document editors, including LibreOffice Writer and Google Docs, use this behavior to support drag-and-drop in long documents; we should follow their lead.

Event Timeline

nshahquinn-wmf raised the priority of this task from to Low.
nshahquinn-wmf updated the task description. (Show Details)
nshahquinn-wmf subscribed.

It's actually not VisualEditor that implements that viewport scrolling. It's part of Chrome's native drag-and-drop feature.

Implementing that in JavaScript in a natural way would be non-trivial. I haven't seen any site implement that, and do it well.

Here's a basic demo exposing the raw content-editable native feature in a browser – with no javascript application around it to control or restrict its behaviour.
https://krinkle.github.io/dom-ce/plain.html

I can reproduce the Chrome behaviour there, but only in Chrome.