New issue
Advanced search Search tips

Issue 803959 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 451659
Owner: ----
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Dropping an image into a tab navigates unexpectedly

Reported by kenn...@twitter.com, Jan 19 2018

Issue description

Chrome Version       : 63.0.3239.132
OS Version: OS X 10.13.2
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari: FAIL
    Firefox: OK
    IE/Edge: ?

What steps will reproduce the problem?
1. Load twitter.com as logged-in user
2. Open Finder on mac
3. Drag an image from Finder into the page showing twitter.com, but not into the tweetbox.
4. Release mouse button

What is the expected result?
Page does not change. Image drop is ignored/cancelled.

What happens instead of that?
Image loads in place of the page.

UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36


This is a very annoying bug. Especially in systems like Jira, where you'll be editing an issue and then attaching a screenshot. When the page is suddenly changed, you might lose your content. It's entirely unepxected behaviour - if I had indeed wanted to load the image in the browser, I would drag it to the address bar or tab bar.

This feels reminiscent of the backspace issue that was recently fixed. Rarely it was used as intended, but mostly it was easy to lose your form data inadvertantly.

 
Cc: elawrence@chromium.org
Components: Blink>DataTransfer
Labels: OS-Chrome OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Summary: Dropping an image into a tab navigates unexpectedly (was: Dropping an image into a tab should not load image in tab)
Browsers generally do not do anything to tell the user when a drop is going to result in a navigation vs. a HTML5 drag/drop event. (That's likely because the browser doesn't have any real way to know before the drop occurs.)

In both Chrome and Firefox on Windows at least, this problem doesn't repro on Twitter, instead you get a pretty dotted outline around the place where you're supposed to perform the drop (see attached picture) and if you drop outside of that region, nothing happens. However, this isn't anything magic the browser is doing-- instead, it's thanks to custom script that Twitter includes. 

A simpler test page is https://html5demos.com/dnd-upload/, which shows in all browsers that if you drop outside the box, the browser treats it as a request to navigate to the local file:// URL, while dropping inside the box is treated as a HTML5 file transfer request.

This all suggests that a workaround for systems like Jira would be to include logic like that on Twitter. However, it's probably very practical to expect all websites to take on such custom code.
TwitterDragDrop.png
41.8 KB View Download
Re #1: replace "probably very practical to expect" with "probably NOT very practical to expect"

Comment 3 by jsb...@chromium.org, Jan 20 2018

Mergedinto: 451659
Status: Duplicate (was: Untriaged)
"This feels reminiscent of the backspace issue that was recently fixed. Rarely it was used as intended, but mostly it was easy to lose your form data inadvertantly."

+1. Drives me nuts. The behavior probably dates from the days when image viewing applications were a thing you needed to install and browsers alleviated some of that pain.

That said... duplicate. Feel free to complain over there too. I'll add my complaint.

Sign in to add a comment