Opened 15 years ago
Closed 14 years ago
#1406 closed defect (fixed)
window.onScroll event not firing when also connecting to a document.documentElement event
Reported by: | Owned by: | alex | |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | General | Version: | 0.2 |
Keywords: | onscroll documentElement | Cc: | |
Blocked By: | Blocking: |
Description
When I connect to the window's onscroll event, it works just fine.
dojo.event.connect(window, "onscroll", function(){dojo.debug("Scrolling!");});
After attaching to an event on document.documentElement, then the onScroll stops working. There are several widgets that attach to the document.documentElement such as the FisheyeList? and causes onScrolls to stop working.
I don't believe the problem is in dojo.event.*, but it could be band-aided by adding some
This problem occurs in Firefox 1.5.0.6 (Windows), Flock 0.7.1 (Windows), and Mozilla 1.7.12. Opera 9 (Windows) and Internet Explorer 7 work correctly.
A workaround involves changing instances of "document.documentElement" to "document".
I've attached an example. You may need to update the path to the dojo.js.
Attachments (1)
Change History (6)
Changed 15 years ago by
comment:1 Changed 15 years ago by
Owner: | changed from anonymous to tk |
---|
comment:2 Changed 15 years ago by
Milestone: | 0.4 → 0.4.1 |
---|
comment:3 Changed 14 years ago by
Milestone: | 0.4.1 → 0.5 |
---|---|
Owner: | changed from tk to alex |
comment:4 Changed 14 years ago by
This seems to be a bug in Firefox (tested with 1.5.0.8)
The following test case reproduces, it has nothing to do with dojo:
function block() { }
document.documentElement.addEventListener("onscroll", block, false); window.addEventListener("onscroll", function() {alert('hey')}, false);
the window onscroll event never gets called, hopefully Bug189308 will be reopened:
http://www.gtalbot.org/BugzillaSection/Bug189308_ScrollEvent.html
jon
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
OK, checked over the 0.9 code (both dijit and dojox). Always connecting to "onscroll" on window so this isn't an issue anymore.
onScroll bug