Chrome 49 causing scroll when draggable element over scrollbar
Reported by
terrence...@gmail.com,
May 2 2016
|
||||||
Issue descriptionUserAgent: 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
,
Nov 4 2016
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.)
,
Nov 4 2016
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.
,
Nov 4 2016
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.
,
Mar 10 2017
Route to input team, since I'm not working for autoscroll last 4 years.
,
Mar 16 2017
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.
,
Mar 23 2017
Worked as intended. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by cbiesin...@chromium.org
, May 3 2016