You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Overview:
File uploads are a complex issue, so AngularJS v1 leaves it up to others to implement: #1375 (comment)
This hasn't been much of a problem, but recently textInput directive has started clobbering the view value: a090400
The textInput directive has been applied to file input elements by default for a long time, but since that change it always adds an onchange listener, so depending on directive ordering, the textInput directive's listener can be called last and clobber the view value.
Suggested Fix:
I don't think file input elements should have the textInput directive applied at all. I think it should be a noop, just like the hidden, button, submit, or reset types.
The text was updated successfully, but these errors were encountered:
This should be fairly easy to fix, but I'm not totally sure how this could be tested. I tend to agree though, it (input[type=file]) really should be noop'd rather than use the textInputType function
textInput shouldn't be applied to file inputs to ease writing of custom file input directives.
This change prevents file inputs from instantiating the text input parser/formatter pipelines.
Closesangular#6247Closesangular#6231
khepin
pushed a commit
to khepin/angular.js
that referenced
this issue
Feb 19, 2014
textInput shouldn't be applied to file inputs to ease writing of custom file input directives.
This change prevents file inputs from instantiating the text input parser/formatter pipelines.
Closesangular#6247Closesangular#6231
Overview:
File uploads are a complex issue, so AngularJS v1 leaves it up to others to implement:
#1375 (comment)
This hasn't been much of a problem, but recently textInput directive has started clobbering the view value:
a090400
The textInput directive has been applied to file input elements by default for a long time, but since that change it always adds an onchange listener, so depending on directive ordering, the textInput directive's listener can be called last and clobber the view value.
Repro: http://jsfiddle.net/mR3P6/6/
Suggested Fix:
I don't think file input elements should have the textInput directive applied at all. I think it should be a noop, just like the hidden, button, submit, or reset types.
The text was updated successfully, but these errors were encountered: