Open Bug 1274838 Opened 8 years ago Updated 2 years ago

Updating the DOM in an overflow event handler causes smooth scrollIntoView to fail

Categories

(Core :: Layout: Block and Inline, defect)

38 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: steve.j.melia, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

Attached file testcase-scroll.html (obsolete) (deleted) —
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.8.0
Build ID: 20160426225641

Steps to reproduce:

See codepen at http://codepen.io/anon/pen/WwVwqL or attached test case.

Press the "add crumb and scroll" button. This button adds an item #second to the container; triggering an overflow event which prepends another item; (#start) and calls "scrollIntoView" on #second.


Actual results:

 The second item is not scrolled into view; it remains to the right of the visible area.


Expected results:

The second item should have been scrolled into view. Subsequent calls to "scrollIntoView" should also correctly scroll the item.
Attached file testcase-scroll.html (deleted) —
Sorry; simplified the test case - the call to scrollIntoView during the overflow is irrelevant; it's the call in the click handler that's coming before the reflow I guess.

This does not occur when using "behavior: 'instant'" in the call to scrollIntoView; only with "behavior: 'smooth'".
Attachment #8755200 - Attachment is obsolete: true
Summary: scrollIntoView called in overflow event handler; followed by another scroll fails to scroll correctly → Updating the DOM in an overflow event handler causes smooth scrollIntoView to fail
Component: Untriaged → Layout: Block and Inline
Product: Firefox → Core
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: