New issue
Advanced search Search tips

Issue 608419 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Chrome 49 causing scroll when draggable element over scrollbar

Reported by terrence...@gmail.com, May 2 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36

Example URL:
https://jsfiddle.net/a1qnbkeb/

Steps to reproduce the problem:
1. Open the JS fiddle (or stack overflow post mentioned in comments)

2. Start dragging the 'draggable' div to the left, on top of the vertical scrollbar and hold it there

What is the expected behavior?
Content does not scroll. If you really want to scroll it, then at least only do it if if the container accepts it (it certainly does not in this situation), or ideally only if they are dragging *within* the container, not a new item.

What went wrong?
This didn't use to happen in previous versions of Chrome (before v49). This causes significant annoyance in our application for users trying to drag new items into the drop area.

I understand that this could be desirable for dragging items items *within* the container, but it's certainly not for new things.

At a minimum, dragging items where the container rejects the drop should not cause a scroll.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes Chrome v48

Does this work in other browsers? Yes 

Chrome version: 49.0.2623.112  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 21.0 r0

I've entered a stack overflow post with the exact same steps and information as the JS fiddle:

http://stackoverflow.com/questions/36989007/chrome-49-causing-scroll-when-draggable-element-over-scrollbar
 
Components: -Blink Blink>DataTransfer
Components: Blink>Scroll
Status: Untriaged (was: Unconfirmed)
I was able to repro (and confirm it did not repro in FF) but I was not able to bisect to a change.

(It's unclear to me that this is a bug. If you're dragging over a scrollable container *I* would expect the container to scroll in case something within the container that might not be visible would accept the drop. But I don't know the history of this feature and whether this change was intentional.)
Unless I'm mistaken, the normal use case is when the mouse, while dragging, gets close to the bottom of the visible are in an overflowed div, then it scrolls. Not when you go on top of a random area of scroll bar.

In my scenario, we have a canvas where users can drag and drop items from the right. Since the vertical scrollbar is on the right, they must cross it to get to the canvas. Now, in chrome, everytime they do the position jumps.

If they do need to drag and see content below, they do so by just dragging to the bottom of the canvas and holding the mouse there.
Components: -Blink>DataTransfer
Owner: yosin@chromium.org
Status: Assigned (was: Untriaged)
The auto-scroll behavior has been present since around Chrome 26 (early 2013); I bisected it back to:

https://chromium.googlesource.com/chromium/src/+/9ea731d6e94034fe78c35753e04dc655a6b11d41

So this auto-scroll behavior is not new. But perhaps there should be a time threshold before the auto-scroll starts.

Comment 5 by yosin@chromium.org, Mar 10 2017

Components: Blink>Input
Owner: ----
Status: Untriaged (was: Assigned)
Route to input team, since I'm not working for autoscroll last 4 years.

Comment 6 by bokan@chromium.org, Mar 16 2017

Cc: bokan@chromium.org
Labels: -Pri-2 Hotlist-Input-Dev Pri-3
This is intended behavior. When dragging an object near any edge of any scrollable box, we auto scroll in that direction.

The scrollbar is near the edge of the overflow div, the fact that there's a scrollbar there is irrelevant. For example, if -- after scrolling right -- you drag the object to the left side of the DIV (which has no scrollbar) you'll see it scrolls leftwards.

There isn't a great solution if you don't want this auto-scrolling behavior but there are workarounds:

-Mark the scroller with overflow: hidden while an element is being dragged. This is simple but has the side effect of disabling scrollbars.
-If you can't live with the scrollbar side effect above, you can place a dummy element over top the scrollbar areas and give it `opacity: 0` of `visibility: hidden` so it isn't visible. It's a horrible hack but it'll prevent autoscroll.


Status: WontFix (was: Untriaged)
Worked as intended.

Sign in to add a comment