diff options
Diffstat (limited to 'src/scenario/Scenario.js')
| -rw-r--r-- | src/scenario/Scenario.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/scenario/Scenario.js b/src/scenario/Scenario.js index 149a0f09..420345f6 100644 --- a/src/scenario/Scenario.js +++ b/src/scenario/Scenario.js @@ -298,9 +298,14 @@ function browserTrigger(element, type) { var parentTrigger = fn.trigger; fn.trigger = function(type) { if (/(click|change|keydown)/.test(type)) { - return this.each(function(index, node) { - browserTrigger(node, type); + var processDefaults = []; + this.each(function(index, node) { + processDefaults.push(browserTrigger(node, type)); }); + + // this is not compatible with jQuery - we return an array of returned values, + // so that scenario runner know whether JS code has preventDefault() of the event or not... + return processDefaults; } return parentTrigger.apply(this, arguments); }; |
