[Webkit-unassigned] [Bug 92003] New: Hiding and showing overflowing divs while keeping scrolled to bottom breaks scroll ability

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 23 08:11:01 PDT 2012


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

           Summary: Hiding and showing overflowing divs while keeping
                    scrolled to bottom breaks scroll ability
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
               URL: http://jsfiddle.net/JVNn7/1/
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: james at wheare.org


As demonstrated in the fiddle http://jsfiddle.net/JVNn7/1/

Two divs with overflowing content, both set to display none initially.

A showAndScroll function sets display to block and sets scrollTop = scrollHeight - offsetHeight (scrolls div to bottom)
A hide function sets display back to stylesheet default of none.

1. Show and scroll first div
2. Hide first div, show and scroll second div
3. Hide second div, show and scroll first div (state should be as it was after step 1)

You can no longer scroll the div up. And if you try to scroll the div down it jumps to the top. Seems like the renderer thinks it's scrolled to the top already.

To workaround you can give it a bump by setting the scroll to anywhere that isn't the bottom (e.g. bottom - 1) and then immediately reset it to the bottom. (See commented lines in fiddle)

This bug is affecting irccloud.com in all current versions of Chrome 20-22 and Safari 5.2 (not 5.1)

-- 
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