0

Here is the code, very simple: http://jsfiddle.net/nyXPc/

HTML:

<div ng-app="" ng-controller="Ctrl">

    <button ng-click='createNewUser()'>Create</button>

    <input ng-model='user.A'>
    <input ng-model='user.B'>
    <input ng-model='user.C'>
    <input ng-model='user.D'>
    <input ng-model='user.E'>
</div>

JS:

function Ctrl($scope){
    $scope.user = {};

    $scope.createNewUser = function(){
        $scope.user = {};
    }
}

I have 5 inputs with ng-model, under IE 11 on Windows 8.1, the browser crashes.

Steps:

  1. Type anything in the five inputs.
  2. Click 'Create'. The inputs should be empty.
  3. Type again in each input. On my computer, the browser crashes.

But if I removed one input and left 4 of them, the browser won't crash.

Any idea?

=================================

Update:New findings

If I give some initial values when create the object, the browser won't crash

  $scope.user = {A: '1', B: '2', C: '3', D: '4', E: '5'};

If I give some empty values, after click the Create button a few times (about 5 to 20 times), the browser crashes.

  $scope.user = {A: '', B: '', C: '', D: '', E: ''};
Zach
  • 5,715
  • 12
  • 47
  • 62
  • is that all the code you have or do you have more html and angular directives in place? does the browser crashes if you don't click create? – Dayan Moreno Leon Jun 18 '14 at 03:53
  • Yes, that's all the code. The browser does not crash if the Create button is not clicked. – Zach Jun 18 '14 at 05:11
  • What do you mean by "crash"? I tried the fiddle in IE11 and could not get it to even throw and error to console no matter what I did. – ivarni Jun 18 '14 at 06:59
  • By crash I mean the IE window closes automatically. Are you running IE 11 under Windows 8? – Zach Jun 18 '14 at 07:12
  • thats what i though. well then don't create a new object o be watched, don't break the reference to the model instead just reset your objects properties and extend the object if you must. – Dayan Moreno Leon Jun 18 '14 at 09:47
  • It's an IE 11 bug. Just found a similiar post: http://stackoverflow.com/questions/20654447/ie11-is-crashing-when-clearing-a-form-with-5-or-more-fields-using-jquery – Zach Jun 20 '14 at 06:23

0 Answers0