-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Textarea placeholder binding causes exception in IE11 #5025
Comments
Also happens in ie10, attempting to access nodeValue on a parentless TextNode (nodeType=3)
|
May be related to #2614 ?? |
Here's a temporary workaround... http://stackoverflow.com/a/20649762/1009125 |
I still prefer capability sniffing over user agent sniffing..... See my post on #2614 |
Sounds great, but which capability could be tested in this case? Ie....ugh |
The capability to not raise an event when the placeholder changes (like the
|
As the docs suggest: Easiest way to address such issues is to switch from using |
@seckardt Cool, I didn't know about I see it's under Developer Guide / Directives in the docs, but not in the API reference. Wouldn't it be a good idea to have it there too? |
This isn't just
The interpolation is redundant, so the workaround in this case was just to remove |
This error happens also when setting the style How can I substitute this expression in a way that it works with IE? |
This is a known issue with IE. As mentioned above, you can use |
Anybody getting this error just look for arguments sent for textarea. I am using angular 1.2.28 I had the same error. |
This error happens, because (for whatever reason) IE temporarily converts And trying to set the I think this is not an Angular-related issue and (taking into account that there is a reasonable workaround - using |
This bug report seems relevant. It seems that the placeholder value would stick around as |
In my case, I dont even have a placeholder. I just have something similar to this |
@LotusShiv, don't put any value in your text area. If you want to initialize it, put the value on the model instead. |
So gkalpak - in my case I need to bind to the existing value from a WebAPI call and also allow user to edit the text area. Hence I had the ng-model and textarea value setting. Now the way I understood from your response is that - I have to set the value coming from the WebAPI call to a $scope object variable and use the same $scope object variable for setting the edited contents as well. Am I understanding you correctly? Again thanks in advance for any suggestions/solution. Sample code is appreciated too.... |
Addendum to my previous comment, I did exactly as I explained of what I understood from gkalpak 's suggestion and it worked. Thanks gkalpak, works just fine in IE 11. Saved a lot of heartache.... :) after days of trying so many other tips and tricks .... |
As many of the people above have mentioned this error is in fact a usage error, in my case it was not in a textarea but the comments above really helped. Thanks everyone :) Not working; |
Also encountered this problem, for me it was |
Same thing with the |
@seckardt you make my day. One of my very old project is still based on Angular1, struggling to find solution to this problem. Thanks a lot. |
Even if there is an "easy workaround", it would be a lot easier, if the error message would be a bit more helpful. I have a huge project and somewhere there is this double interpolation. How am I supposed to find this? |
See the following fiddle:
http://jsfiddle.net/provegard/wLBwd/
While the correct placeholder appears, I also get the following stack trace in the console:
IE version is 11.0.9600.16438
The text was updated successfully, but these errors were encountered: