angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

Using ng-cloak in IE9 prevents Enter key from submitting the form.

Open MartinDionne opened this issue 11 years ago • 1 comments

Overview: When the ng-cloak directive is applied to a div containing input controls, you can no longer submit the form by using the Enter key in IE9.

Angular version(s): 1.3.4, 1.3.8 Browser & OS: Internet Explorer 9, Windows 7 Reproducable: Always Reproduction: Available in this plunker: http://plnkr.co/edit/#!/ELtNjKPfKIW3Si2uJGFC

With markup similar to

    <form name="form" novalidate ng-submit="save()">
          <div ng-cloak>
              <label for="one">One:</label>
              <input id="one" ng-model="one" type="text"/>
              <label for="two">Two:</label>
              <input id="two" ng-model="two" type="text"/>
              <button type="submit" value="save">Save</button>
          </div>
    </form>

you cannot submit the form by pressing the Enter key while the focus is on one of the input controls. You can use the Enter key in other browsers (including IE10), or if you remove the ng-cloak directive. This has been replicated on multiple workstations.

MartinDionne avatar Jan 12 '15 17:01 MartinDionne

Oh dear, it looks like one of the IE9 quirks... Had a brief look at it but can't see any obvious work-arounds... But this is a valid bug report...

pkozlowski-opensource avatar Jan 20 '15 16:01 pkozlowski-opensource