Ticket #1327 (closed bug: duplicate)
Java Script Object Required in line 1324
| Reported by: | maethorin | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.1.4 |
| Component: | event | Version: | 1.1.3 |
| Keywords: | Object Required | Cc: | |
| Blocking: | Blocked by: |
Description
Hi all,
I have this BUG when use jQuery in IE and find just one coment about it in the internet:
http://lists.wymeditor.org/pipermail/wymeditor-devel/2007-March/000016.html
Its give me a very important information (where the bug is), but don't resolve the problem.
Look at the code I found the following lines:
1321: if ( event.pageX == undefined && event.clientX != undefined ) {
1322: var e = document.documentElement, b = document.body;
1323: event.pageX = event.clientX + (e.scrollLeft || b.scrollLeft);
1324: event.pageY = event.clientY + (e.scrollTop || b.scrollTop);
1325: }
I don't understand why the BUG fired at 1324 and not in the 1323... I think is a message erro problem of the IE.
I change the code to this:
if ( event.pageX == undefined && event.clientX != undefined ) {
var e = document.documentElement, b = document.body;
if (e) {
event.pageX = event.clientX + (e.scrollLeft);
event.pageY = event.clientY + (e.scrollTop);
}
else if (b) {
event.pageX = event.clientX + (b.scrollLeft);
event.pageY = event.clientY + (b.scrollTop);
}
}
With this, the BUG was fixed. I send this to you to verified the impact of this change in the core of the jQuery.
Regards
Márcio Duarte
Change History
comment:1 Changed 6 years ago by brandon
- Status changed from new to closed
- Resolution set to duplicate
- Component changed from core to event
comment:2 Changed 6 years ago by maethorin
- Status changed from closed to reopened
- Resolution duplicate deleted
I download the 1.1.3.1 and I can't find the solution proposed in changeset 2193.
the code for 1.1.3.1 is:
if ( event.pageX == null && event.clientX != null ) {
var e = document.documentElement, b = document.body;
event.pageX = event.clientX + (e && e.scrollLeft || b.scrollLeft);
event.pageY = event.clientY + (e && e.scrollTop || b.scrollTop);
}
With this, the bug persists. In the changeset 2193, the code is:
if ( event.pageX == null && event.clientX != null ) {
var e = document.documentElement || document.body;
event.pageX = event.clientX + e.scrollLeft;
event.pageY = event.clientY + e.scrollTop;
var e = document.documentElement, b = document.body;
event.pageX = event.clientX + (e && e.scrollLeft || b && b.scrollLeft);
event.pageY = event.clientY + (e && e.scrollTop || b && b.scrollTop);
}
I tested this code of the changeset and it's work for my problem.
Thanks
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Duplicate of #1322