mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
fix(scenario): temporary fix for FF6
https://bugzilla.mozilla.org/show_bug.cgi?id=684208
This commit is contained in:
parent
4b4292edb8
commit
aac68bf2ba
1 changed files with 12 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue