mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-04 22:49:48 +08:00
fix(scenario): temporary fix for FF6
https://bugzilla.mozilla.org/show_bug.cgi?id=684208
This commit is contained in:
@@ -279,9 +279,19 @@ function browserTrigger(element, type) {
|
||||
}
|
||||
return ret;
|
||||
} else {
|
||||
var evnt = document.createEvent('MouseEvents');
|
||||
var evnt = document.createEvent('MouseEvents'),
|
||||
processDefault = true,
|
||||
originalPreventDefault = evnt.preventDefault;
|
||||
|
||||
// vojta: temporary fix for https://bugzilla.mozilla.org/show_bug.cgi?id=684208
|
||||
evnt.preventDefault = function() {
|
||||
processDefault = false;
|
||||
return originalPreventDefault.apply(evnt, arguments);
|
||||
};
|
||||
|
||||
evnt.initMouseEvent(type, true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, element);
|
||||
return element.dispatchEvent(evnt);
|
||||
element.dispatchEvent(evnt);
|
||||
return processDefault;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user