[Webkit-unassigned] [Bug 85884] New: REGRESSION: Scrollbar in wrong position for element that is hidden then unhidden

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 8 07:56:23 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=85884

           Summary: REGRESSION: Scrollbar in wrong position for element
                    that is hidden then unhidden
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: dubroy at chromium.org


When an element that has 'overflow: auto' is hidden and then shown again, the scrollbar is rendered at its old position, but it behaves as though it's at the top. I.e., it's only possible to scroll down, not up.
Repro case:

<!doctype html>
<title></title>
<div style="height: 100px; overflow: auto; border: 1px solid pink;">
  <div style="height: 200px;"></div>
</div>
<script>
  function toggleVisibility() {
    var div = document.querySelector('div');
//  div.style.display = (div.style.display == 'none') ? 'block' : 'none';
    div.hidden = !div.hidden;
  }
  document.onclick = function() {
    toggleVisibility();
    setTimeout(toggleVisibility, 0);
  }
</script>

To reproduce:
1. Scroll down to the bottom of the outer div.
2. Click somewhere outside the div to hide and re-show it.
3. Observe that even though the scroll bar appears to be at the bottom, it's not possible to scroll up. Scrolling down causes the scroll bar to jump to the top, then everything works as expected.

I've observed this in the WebKit nightly build, and in Chrome Canary (20.0.1130.0) and Dev (20.0.1123.4). The bug is not present in Safari 5.1.5 (6534.55.3) or Chrome 19.0.1084.41.

This looks related to bug 47963 and bug 26438 but it's not quite the same issue.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list