Open Bug 527582 Opened 12 years ago Updated 3 years ago

window.onscroll event handler does not register the correct value of a global variable if variable changed just before and after window.scrollBy is called.


(Core :: DOM: UI Events & Focus Handling, defect)

Not set





(Reporter: gary.haran, Unassigned)



(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a1pre) Gecko/20091109 Minefield/3.7a1pre

If I change a global variable value just before calling window.scrollBy(0,1) and then back again the onscroll event handler does not see the correct value.

Reproducible: Always

Steps to Reproduce:
1. Open attachment and load page in FF. 
2. Click scroll button.
3. Look at the document.title 
Actual Results:  
document.title is "false"

Expected Results:  
document.title should be "I would expect this to be in the title."

Check attachment.
Attached file Test Case For Bug
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a1pre) Gecko/20091109 Minefield/3.7a1pre

> document.title should be "I would expect this to be in the title."
only Google Chrome has this outcome.
Firefox, Opera, IE8: "false"
Component: General → Event Handling
Product: Firefox → Core
QA Contact: general → events
Version: unspecified → Trunk
Scrolling (or any layout or painting for that matter) doesn't occur until the script ends, at which point, you've already changed the title again, so our behaviour looks ok to me.
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.