Ticket #10004 (closed bug: invalid)
»e.cancelBubble = true;« does often raise "... member not found .." for IE's <= 8
| Reported by: | peter.seliger@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | None |
| Component: | ajax | Version: | 1.6.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
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
Change History
comment:1 follow-up: ↓ 2 Changed 22 months ago by timmywil
- Priority changed from undecided to low
- Resolution set to invalid
- Status changed from new to closed
- Component changed from unfiled to ajax
comment:2 in reply to: ↑ 1 Changed 22 months ago by peter.seliger@…
Replying to 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
comment:3 Changed 22 months ago by timmywil
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.
comment:4 Changed 19 months ago by anonymous
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'.
comment:5 Changed 7 months ago by Simon
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.
comment:6 Changed 7 months ago by blyry
I posted a workaround at http://stackoverflow.com/a/10050427/346272, for users getting here from google.
comment:7 Changed 6 months ago by anonymous
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/
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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