Repository navigation
Conversation
…holder change Certain versions of IE inexplicably trigger an input event in response to a placeholder being set. It is not possible to sniff for this behaviour nicely as the event is not triggered if the element is not attached to the document, and the event triggers asynchronously so it is not possible to accomplish this without deferring DOM compilation and slowing down load times. Closes angular#2614 Closes angular#5960
There was a problem hiding this comment.
This test doesn't really work without the async junk, sorry about that :(
There was a problem hiding this comment.
Hmm. I wonder whether the benefit of actually testing against the real behaviour in IE10 is worth the async stuff. Perhaps we should just mock out the IE bits and isolate the code you wrote?
There was a problem hiding this comment.
I'll see if it's mock-able
|
Do we know exactly what versions of IE exhibit this behaviour? |
|
the original issue and some stackoverflow posts report IE10 and a few cases IE11, with unknown emulation modes (but it definitely affects IE10 standards mode) https://travis-ci.org/angular/angular.js/jobs/17502175 this build doesn't have the fix, just the test, so you can see it fail a few times |
|
This is quite nasty. I wonder if it is fixable with a polyfill for placeholder instead. Then we can offer that as a work around rather than hacking AngularJS? What do you think? |
|
I think it's worth a shot, but I don't think there's any guarantee it would work. I'll try it out on saucelabs real quick Actually most of these shims look like they're just adding placeholder rendering to browsers which don't support it natively, so I'm not super convinced these would fix the issue |
|
So these polyfills tend to remove the placeholder attribute altogether and then simulate it instead. |
|
OK, so I guess that apart from fine tuning the conditions of the |
|
Just tested all of those polyfills with stock angular 1.2.9 on saucelabs IE10 http://plnkr.co/edit/PWwP3OZTtcp7VUEDHLcq?p=preview, none of them solve the issue. So maybe the if conditions can be tuned up a bit. On the other hand maybe it's not totally worth fixing it, I dunno. I'll see if I can clean it up a bit, though |
…holder change Certain versions of IE inexplicably trigger an input event in response to a placeholder being set. It is not possible to sniff for this behaviour nicely as the event is not triggered if the element is not attached to the document, and the event triggers asynchronously so it is not possible to accomplish this without deferring DOM compilation and slowing down load times. Closes angular#2614 Closes angular#5960
…holder change Certain versions of IE inexplicably trigger an input event in response to a placeholder being set. It is not possible to sniff for this behaviour nicely as the event is not triggered if the element is not attached to the document, and the event triggers asynchronously so it is not possible to accomplish this without deferring DOM compilation and slowing down load times. Closes angular#2614 Closes angular#5960
…holder change Certain versions of IE inexplicably trigger an input event in response to a placeholder being set. It is not possible to sniff for this behaviour nicely as the event is not triggered if the element is not attached to the document, and the event triggers asynchronously so it is not possible to accomplish this without deferring DOM compilation and slowing down load times. Closes angular#2614 Closes angular#5960
There was a problem hiding this comment.
lastly, could remove the msie check from both the test and the code, which is probably okay but I'm not positive
…holder change Certain versions of IE inexplicably trigger an input event in response to a placeholder being set. It is not possible to sniff for this behaviour nicely as the event is not triggered if the element is not attached to the document, and the event triggers asynchronously so it is not possible to accomplish this without deferring DOM compilation and slowing down load times. Closes angular#2614 Closes angular#5960
…holder change Certain versions of IE inexplicably trigger an input event in response to a placeholder being set. It is not possible to sniff for this behaviour nicely as the event is not triggered if the element is not attached to the document, and the event triggers asynchronously so it is not possible to accomplish this without deferring DOM compilation and slowing down load times. Closes angular#2614 Closes angular#5960
There was a problem hiding this comment.
Make note of affected IE versions here
There was a problem hiding this comment.
can you change this to msie < 11 and test it on IE11?
There was a problem hiding this comment.
We're running Angular 1.0.8, and only had the placeholder problem in IE10 (IE v10.0.9200.16899 on Windows 8). We added the changes to the textInputType function, and it solved the problem.
|
otherwise this looks good |
…holder change Certain versions of IE inexplicably trigger an input event in response to a placeholder being set. It is not possible to sniff for this behaviour nicely as the event is not triggered if the element is not attached to the document, and the event triggers asynchronously so it is not possible to accomplish this without deferring DOM compilation and slowing down load times. Closes #2614 Closes #5960
Certain versions of IE inexplicably trigger an input event in response to a placeholder being set.
It is not possible to sniff for this behaviour nicely as the event is not triggered if the element is not attached to the document, and the event triggers asynchronously so it is not possible to accomplish this without deferring DOM compilation and slowing down load times.
Closes #2614
Closes #5960
This that could theoretically go wrong:
lastValue === valueis added to the exit condition, then the same issue above still potentially happens when an empty string becomes an invalid string and constraint validation gives us an empty string.There are probably a few more holes in this, unfortunately, which is why it would be better if MS would hotfix the affected browsers. But it's not breaking any tests and if it doesn't break any apps which dogfood it then that's probably fine.