Skip to main content

Bug Tracker

Side navigation

#10004 closed bug (invalid)

Opened August 08, 2011 03:45PM UTC

Closed August 08, 2011 03:50PM UTC

Last modified November 30, 2012 05:25AM UTC

»e.cancelBubble = true;« does often raise "... member not found .." for IE's <= 8

Reported by: peter.seliger@googlemail.com Owned by:
Priority: low Milestone: None
Component: ajax Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:
Description

beeing forced to execute »e.cancelBubble = true;« does often raise an error for Internet Explorer Versions 8 and beneath.

»... member not found ...« will be raised in line/row 3172 as of jquery-1.6.2.js. that is the last assignment of method [stopPropagation] of [jQuery.Event.prototype].

after 2 hours of analyzing my and jquery's code execution pingpong I wanted to "hotfix" this problem. But as it turned out a simple replacement of

e.cancelBubble = true;

by

('cancelBubble' in e) && (e.cancelBubble = true);

did not work. Even though logging did assure that there is a property called 'cancelBubble' of [e] accessing this very property by [e.cancelBubble] will fail not always but often enough.

Wrapping »e.cancelBubble = true;« into an ugly try catch block did solve the problem at last. But this surely was not my favourit solution.

thanks for having a look on it - so long - Peter Seliger

Attachments (0)
Change History (7)

Changed August 08, 2011 03:50PM UTC by timmywil comment:1

component: unfiledajax
priority: undecidedlow
resolution: → invalid
status: newclosed

To stop propogation, use e.stopPropagation() as that will take care of cancelBubble for you. There is no need to manipulate it directly.

Changed August 08, 2011 04:04PM UTC by peter.seliger@googlemail.com comment:2

Replying to [comment:1 timmywil]:

To stop propogation, use e.stopPropagation() as that will take care of cancelBubble for you. There is no need to manipulate it directly.

that's what the application code does in the first place ...

executing [stopPropagation] of an jquery event object. that results

in the behavior I already did describe before. An error occurs within

jQuery's implementation of [jQuery.Event.prototype.stopPropagation].

so long - Peter

Changed August 08, 2011 05:56PM UTC by timmywil comment:3

If you have a reduced test case that reproduces the error for us, feel free to open another ticket and we can take a closer look.

Changed November 02, 2011 09:23AM UTC by anonymous comment:4

if (typeof e.cancelBubble !== 'unknown') {

e.cancelBubble = true;

}

Don't ask why, but it worked... For some reason jQuery or IE returns 'unknown' here in stead of 'undefined'.

Changed October 17, 2012 09:27AM UTC by Simon comment:5

I can't provide a detailed test case, I'm afraid - however, this problem can be checked with the qTip plugin. Here's the bug report:

https://github.com/Craga89/qTip2/issues/38

Maybe someone is able to tear this down to a simple test case.

Changed November 07, 2012 02:49AM UTC by blyry comment:6

I posted a workaround at http://stackoverflow.com/a/10050427/346272, for users getting here from google.

Changed November 30, 2012 05:25AM UTC by anonymous comment:7

Accessing event object whose originalEvent object had been invalidate can occur this problem.. Yes. those who use timeout might run into this problem(IE).

well, if this is the case, it looks like not jQuery's problem... right? provide fiddle for this mess. http://jsfiddle.net/gmeW6/1/