Skip to main content

Bug Tracker

Side navigation

#1327 closed bug (duplicate)

Opened June 27, 2007 03:27PM UTC

Closed July 20, 2007 08:07PM UTC

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:
Blocked by: Blocking:
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

Attachments (0)
Change History (3)

Changed June 29, 2007 10:24PM UTC by brandon comment:1

component: coreevent
resolution: → duplicate
status: newclosed

Duplicate of #1322

Changed July 09, 2007 02:35PM UTC by maethorin comment:2

resolution: duplicate
status: closedreopened

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

Changed July 20, 2007 08:07PM UTC by john comment:3

milestone: 1.1.31.1.4
resolution: → duplicate
status: reopenedclosed
version: 1.1.21.1.3

Duplicate of #1402.