Closed Bug 804097 Opened 12 years ago Closed 9 years ago

Scrolling not possible with onscroll handler setting position on element

Categories

(Core :: DOM: Events, defect)

16 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox16 --- affected
firefox17 --- affected
firefox18 --- affected

People

(Reporter: u453670, Unassigned)

Details

(Keywords: regression)

Attachments

(1 file)

Attached file Test case
If an onscroll handler sets the position of an element then dragging the vertical scrollbar will not scroll the window more than a few pixels. Having elements on the page with "position: absolute" appears to be a factor, and I have only hit this bug when one of the elements is a select. This only affects scrolling by dragging the scrollbar. Mouse wheel scrolling and cursor key scrolling work as expected. This is not a bug in Firefox 15.0.1. I am including the simplest page I can create which shows the bug. to recreate, save the following html (also included as an attachment), open it in FF16 and drag the vertical scrollbar down. You will only get a few pixels down the page before the scrollbar stops moving. <html> <head> <script type="text/javascript"> window.onload = function() { var y = 0; window.onscroll = function(){ document.getElementById("div1").style.top = y++; }; }; </script> </head> <body> <div id="div1" style="position:absolute;">div1</div> <select style="position:absolute;"></select> <div style="height:2000px;">spacer to force scrollbar</div> </body> </html>
Comment on attachment 673812 [details] Test case ><html> > <head> > <script type="text/javascript"> > window.onload = function() { > var y = 0; > window.onscroll = function(){ > document.getElementById("div1").style.top = y++; > }; > }; > </script> > </head> > <body> > <div id="div1" style="position:absolute;">div1</div> > <select style="position:absolute;"></select> > <div style="height:2000px;">spacer to force scrollbar</div> > </body> ></html>
Attachment #673812 - Attachment mime type: text/plain → text/html
STR: 1. Load the testcase 2. Hit Home to be sure your at the top 3. try drag the scrollbar block to the bottom of the page Expected result: The page should scroll to the end of the page Actual result: The page scroll a few tens of pixels then stops until you release and drag the box again Last good nightly: 2012-06-23 First bad nightly: 2012-06-24 Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=bb4b37094b9f&tochange=cb2904476d14 I'm not confining this until I've reduced the range further.
OS: Windows 7 → All
Hardware: x86 → All
The first bad revision is: changeset: 97475:23f5c88adb8f user: Mats Palmgren <matspal@gmail.com> date: Sat Jun 23 03:13:56 2012 +0200 summary: Bug 575294. part=2/5 r=smaug,roc This might be a dup or depend on bug 803995
Status: UNCONFIRMED → NEW
Component: General → DOM: Events
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0 I have tested this issue on Windows 10 x64 with the latest Firefox release (47.0.1) and the latest Nightly (50.0a1-20160713030216) and could not reproduce it. After following the STR from comment 2, I was able to drag the scrollbar block all the way to the bottom of the page without any issues. Considering the fact that I cannot reproduce this, I will mark this as Resolved-Worksforme. If anyone can still reproduce it, feel free to reopen the issue and provide more information.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: