#6170 closed bug (fixed)
jQuery(window).scroll(); causes IE* to scroll to 0,0
Reported by: | rlrosario | Owned by: | dmethvin |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | event | Version: | 1.4.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Triggering the scroll event on the window ('jQuery(window).scroll();') should be considered a special case because the window object has a scroll method that takes two parameters: x,y. On non-IE browsers, the call gets ignored when parameters aren't passed in. But on IE*, the call takes on 0,0 as a default and scrolls the page. This issue is preventing me from triggering scroll handlers this way because of the undesirable side effect.
I wrote a patch on github: http://github.com/rlr/jquery/commit/10966bb9b0c46c69697ebf4703b8ddc9906648f3
Change History (10)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Priority: | → undecided |
---|---|
Status: | new → open |
comment:3 Changed 12 years ago by
Milestone: | 1.4.2 → 1.6 |
---|---|
Owner: | set to dmethvin |
Priority: | undecided → low |
Status: | open → assigned |
comment:4 Changed 12 years ago by
Milestone: | 1.6 → 1.next |
---|---|
Priority: | low → high |
comment:5 Changed 12 years ago by
This is the problem where we execute methods on things that are not .nodeType===1
DOM elements, such as window
or plain Object
. The solution is to not run those methods for such cases.
comment:7 Changed 12 years ago by
Since this behavior may be desired (or at least currently used) for plain objects, I'm only planning to exclude window
in the 1.7 patch.
comment:8 Changed 12 years ago by
Milestone: | 1.next → 1.7 |
---|
comment:9 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fix #6170. Don't try to run DOM methods on window
.
Changeset: 6872d31f5a7d6162161b61bfd35ad0e8aa545395
Any way to edit this bug? It really should be Version 1.4.2 Milestone 1.4.3 but that wasnt available when I submitted it?