#1153 closed bug (fixed)
IE sometimes objects to jquery.event.fix
Reported by: | wizzud | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.2.2 |
Component: | event | Version: | 1.1.2 |
Keywords: | pageX pageY IE fix | Cc: | |
Blocked by: | Blocking: |
Description (last modified by )
I have a problem with IE and the fix method of jquery.event, whereby it (IE) sometimes objects to the variable b (=document.body) not being an object. This usually happens on a page refresh, but cannot reliably be re-produced. The solution I have put in place is a very small modification to the assignment of the 'e' and 'b' variables prior to setting event.pageX and event.pageY (if they are not available).
Using jquery 1.1.2 rev 1465 code, at line 2904 I changed
var e = document.documentElement, b = document.body;
to
var e = document.documentElement || {}, b = document.body || {};
and this solved the problem.
I have not been able to find any reports of anybody else having this same problem, so why it should be happening to me I'm not sure. I am developing with the Ext library, using jquery as the engine, and I don't know if that is having any effect, but if it is I can't see why it should! Anyway, its a really minor change, but if it could be incorporated into the jquery core it would save me having to re-apply it on updates?
Change History (4)
comment:1 Changed 16 years ago by
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:2 Changed 15 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I am using Jquery 1.1.4 (also using Ext, but not sure if thats whats causing it), and this bug STILL comes up in IE6 during refreshes/initial loads.
I am getting the error message "Object required" for that same line
So what I did was what the initial recommended fix was and removed
var e = document.documentElement, b = document.body;
And put in
var e = document.documentElement || {}, b = document.body || {};
and now everything works fine. I know since that this was first reported there have been slight changes to the surrounding code in the same function but those did NOT fix/suppress? the error it like the above code does.
comment:3 Changed 15 years ago by
Milestone: | 1.1.3 → 1.2.2 |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
Fixed in Rev [3485]
comment:4 Changed 15 years ago by
I had the same issue with jQuery 1.2.1.
I'm also using it together with Ext and would sometimes get an 'Object required' error in IE6 on reloading a page and simultaneously moving the mouse around on the page. (->click reload->move mouse around on page->error).
Applying the fix seems to have solved the issue.
Fixed in Rev [1886].