New issue
Advanced search Search tips

Issue 832062 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Mouse loses scrollbar when element is updated

Reported by thomas.m...@gmail.com, Apr 12 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Steps to reproduce the problem:
1. Open the attached bug.html. The current time is displayed in a gray element and updated every second.
2. Click and hold the left mouse button on the scrollbar in the gray element and slowly move the mouse down
3. Within one second the mouse loses the scrollbar and you are not able to scroll any further

What is the expected behavior?
You should be able to scroll for as long as you want

What went wrong?
When the element's innerhtml is updated, the mouse is no longer holding on to the scrollbar.

Did this work before? N/A 

Does this work in other browsers? No
 The same problems occurs in Opera, but not Firefox or Edge.

Chrome version: 65.0.3325.181  Channel: stable
OS Version: 10.0
Flash Version:
 
bug.html
345 bytes View Download
Cc: bokan@chromium.org
Labels: Hotlist-Input-Dev
Status: Available (was: Unconfirmed)
bokan@ how should the overlay scrollbar behave when the content of the scrollable area changes? Currently it does hide the scrollbar which seems a little annoying.

Comment 2 by bokan@chromium.org, Apr 12 2018

Components: -Blink>Scroll Blink>Layout>Scrollbars
Looks like the scrollbar is being recreated each time the timer fires. This is a layout stability issue.

Comment 3 by bokan@chromium.org, Apr 12 2018

FWIW, there's a simple workaround, split up the current div into one that causes the overflow (and scrollbars) and one that houses the content.

<div style="display: grid; height: 200px">
    <div style="overflow: auto">
      <div style="height: 400px; background-color:#cccccc">
        <div id="test"><!-- CONTENT GOES HERE --></div>
      </div>
    </div>
</div>

Comment 4 by bokan@chromium.org, Apr 13 2018

Status: Untriaged (was: Available)
Marking as untriaged so layout team actually sees it

Comment 5 by e...@chromium.org, Apr 23 2018

Status: WontFix (was: Untriaged)
Setting the inner html removes all the old content (and thus the auto scrollbar) before creating the new content and, if it still overflows, creates a new scrollbar.

This is by design and working as intended.

Setting overflow to scroll instead preserves the scrollbar across invocations.
I am using Chrome 66.0.3359.117 and I am still seeing the same problem with the workaround suggested in comment 3.

https://jsfiddle.net/dgtmgam9/15/

Comment 7 by bokan@chromium.org, Apr 24 2018

Yeah, sorry - the overflow: auto div needs to have an explicit height: https://jsfiddle.net/dgtmgam9/20/

Or make the top level div overflow: auto: https://jsfiddle.net/dgtmgam9/19/

Sign in to add a comment