diff options
Diffstat (limited to 'src/ngScenario/dsl.js')
| -rw-r--r-- | src/ngScenario/dsl.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ngScenario/dsl.js b/src/ngScenario/dsl.js index 8a1bccb1..7f399394 100644 --- a/src/ngScenario/dsl.js +++ b/src/ngScenario/dsl.js @@ -198,12 +198,13 @@ angular.scenario.dsl('binding', function() { */ angular.scenario.dsl('input', function() { var chain = {}; + var supportInputEvent = 'oninput' in document.createElement('div'); chain.enter = function(value, event) { return this.addFutureAction("input '" + this.name + "' enter '" + value + "'", function($window, $document, done) { var input = $document.elements('[ng\\:model="$1"]', this.name).filter(':input'); input.val(value); - input.trigger(event || 'blur'); + input.trigger(event || supportInputEvent && 'input' || 'change'); done(); }); }; |
