Open Bug 1327923 Opened 8 years ago Updated 2 years ago

[e10s] It's possible to accidentally drag-n-drop link/image onto the same tab and replace current page

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

defect

Tracking

()

People

(Reporter: arni2033, Unassigned)

Details

>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509
STR_1:
1. Open url [1] or url [2] in a new tab
2. Drag Link/image on that page to the center of the page
3. Wait until new page loads
4. Drop Link/image onto the free place on the page

AR:  Drop happens. Link/image loads in the same tab
ER:  Link/image shouldn't replace current url if I drag-n-drop it from this very tab onto the web page

> [1] data:text/html,<html ondragstart="location.href='http:/example.org'"><a href="http:/ya.ru">Link
> [2] data:text/html,<html ondragstart="location.href='http:/example.org'"><img src="about:logo">
No longer blocks: 1277113
Component: Untriaged → Drag and Drop
Product: Firefox → Core

For what it's worth, Chromium has now changed to stop blowing away the current tab upon a drop: https://textslashplain.com/2020/06/03/avoiding-unexpected-navigation/

Severity: normal → S3

I just encountered this problem as well, in a more severe way! I was working on a website which had a file upload form. But the implementation is poor. If I open the upload form and "drag and drop" a few files, it adds those on a list. Now the list looks like I could drag-drop more files onto it (kind of like how Google Drive works). But no, I actually have to click an "Upload More" button to show the drop target FIRST, before I drag-drop more files.

Not knowing this absurd requirement, I drag-dropped another bunch of files onto the list. Misleadingly, Firefox was showing "-> Move" action under the mouse cursor, confusing me to think that the list is also a drop target (which it's not). What happens next, is the entire page is replaced by the first file, then a bunch of additional tabs were opened for the second file onward.

Please fix this! I like the behavior of Chrome and Edge described in https://textslashplain.com/2020/06/03/avoiding-unexpected-navigation/ but I'm also OK to simply show Not Allowed cursor and just cancel the drop action if there's no drop target in the website. Or at least warn before replacing the current page from a drop action.

Is there a timeline to fixing this in Firefox? Is there any about:config setting or other way to change the behavior?

Flags: needinfo?(continuation)

Sorry, I don't think there's any specific plan to work on this issue. Drag and drop is in general rather finicky and not a high priority.

Flags: needinfo?(continuation)
You need to log in before you can comment on or make changes to this bug.