aboutsummaryrefslogtreecommitdiffstats
path: root/src/scenario
diff options
context:
space:
mode:
authorVojta Jina2011-09-02 14:13:33 +0200
committerVojta Jina2011-09-08 23:00:59 +0200
commitaac68bf2ba2dcdf0b22fa4f15ea49672cb06328d (patch)
tree7415683bde219b5ee878abf04608ee8e6c25fece /src/scenario
parent4b4292edb86d34067a2babb9f572a3641dd1d2a7 (diff)
downloadangular.js-aac68bf2ba2dcdf0b22fa4f15ea49672cb06328d.tar.bz2
fix(scenario): temporary fix for FF6
https://bugzilla.mozilla.org/show_bug.cgi?id=684208
Diffstat (limited to 'src/scenario')
-rw-r--r--src/scenario/Scenario.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/scenario/Scenario.js b/src/scenario/Scenario.js
index 420345f6..3914bdfc 100644
--- a/src/scenario/Scenario.js
+++ b/src/scenario/Scenario.js
@@ -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;
}
}