Angular and Internet Explorer 11 - Inputs do not work correctly

I have serious problems with logins using ng-model in IE (11 and in all previous versions), but everything works correctly in all other browsers. This question was first noted last week. We did not update this section of our application and did not hear reports from users who have this problem until last week.

We are launching Angular 1.4.3.

Basically, inputs like this:

<input data-ng-model="answer.value"></input> 

Incorrect model update. This seems like a problem with the onChange or onFocus events - inputs never lose their ng-pristine and ng-pristine classes. They correctly display the initial value from the model, but any updates made by the user are simply not saved. We experimented with adding the <meta http-equiv="X-UA-Compatible" content="IE=11" /> to our head to no avail. Removing all checks from the inputs does not matter. No console errors or warnings.

+7
source share
2 answers

I had a problem with simillar and the solution seems to be easy. If you have code similar to this:

 <form name="myForm"> <table ng-disabled="formToggle"> ... <input ng-model="form.name" /> ... </table> </form> 

IE10, IE11 will not check the fields and will not set its original dirty values ​​in the form (other browsers work fine). Just remove ng-disabled (from the table in this case and in another case from the parent) and it will work.

+1
source

In my case, I had a parent component and a child input.

The parent component had a poor selection of the angle snap attribute; I called the attribute " disabled ". disabled was the wrong choice of custom attribute name because it is a standard attribute for many HTML elements.

When I changed the name of the user attribute to " custom-disabled ", the child inputs started responding.

Internet Explorer interpreted some attribute of the disabled ancestor to mean that all descendants should be disabled; so my angular input ng-model , ng-change , ng-blur , ng-focus did not work.

I should have known: when I asked $('input').is(':disabled') , the result was true . I ignored this because the input element itself did not have a disabled attribute; only an ancestor element did!

0
source

All Articles