Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

input[type="file"] defaults to textInput directive; conflicts w/ custom directive #6231

Closed
@igienger

Description

@igienger

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions