IE < 9 showing displaying “Member not found”

China☆狼群 提交于 2019-11-30 06:59:03

For others who get here who don't want to modify the jQuery source...(FOR THE LOVE OF GOD DON'T DO THAT)

This happens in ie<9 when firing custom events. If you have access to the event before it gets to the point where ie crashes, just travel down the originalEvent chain and set the last one = {};

The below code is for when you are relying jQuery to process the event handlers return value (false) somewhere down the chain. If you want to cancel the event here, see the comments - wrap a call to e.stopPropagation() in a try/catch block

var handleAndFire = function(e) {
 var ev = new $.Event('stack.overflow');

    //you may have to debug and manually inspect to see how 
    //deep the originalEvents go
    //or you could write your own function to traverse 
    //depth first and find it automatically, I'm lazy.
    e.originalEvent.originalEvent = {}; //fix for ie < 9
    ev.originalEvent = e;
    $(document).trigger(ev);    
}
$(document).click(handleAndFire);

After sometime searching, I seems to be affected by jQuery bug. Following the "comment:4" , changing the jQuery-1.6.2.js file, line 3172 solved the problem.

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'.

Obtained from :

Source : http://bugs.jquery.com/ticket/10004

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!