Bug 44881
Summary: | Non-file inputs cannot be changed to file inputs via JavaScript | ||
---|---|---|---|
Product: | WebKit | Reporter: | Aryeh Gregor <ayg> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Minor | CC: | ap, aureltrotebas, dtrebbien, tabatkins |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Aryeh Gregor
Test case:
<!doctype html>
<script>
var el = document.createElement("input");
el.type = "radio";
el.type = "file";
alert(el.type);
</script>
Chrome dev (on Ubuntu) and Safari 5 (on XP) alert "radio". Recentish Firefox nightly and Opera 10.60 alert "file". The latter is certainly correct per spec. If there's some security reason for this, the spec should be changed to mandate it so we have interoperability.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
*** Bug 80213 has been marked as a duplicate of this bug. ***