diff options
Diffstat (limited to 'test/ng')
| -rw-r--r-- | test/ng/directive/inputSpec.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ng/directive/inputSpec.js b/test/ng/directive/inputSpec.js index 3783c9ed..c6f5558a 100644 --- a/test/ng/directive/inputSpec.js +++ b/test/ng/directive/inputSpec.js @@ -454,6 +454,20 @@ describe('input', function() { expect(scope.name).toEqual('adam'); }); + it('should not update the model between "compositionstart" and "compositionend"', function() { + compileInput('<input type="text" ng-model="name" name="alias"" />'); + changeInputValueTo('a'); + expect(scope.name).toEqual('a'); + if (!(msie < 9)) { + browserTrigger(inputElm, 'compositionstart'); + changeInputValueTo('adam'); + expect(scope.name).toEqual('a'); + browserTrigger(inputElm, 'compositionend'); + } + changeInputValueTo('adam'); + expect(scope.name).toEqual('adam'); + }); + describe('"paste" and "cut" events', function() { beforeEach(function() { // Force browser to report a lack of an 'input' event |
