aboutsummaryrefslogtreecommitdiffstats
path: root/src/scenario/Scenario.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/scenario/Scenario.js')
-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;
}
}