Bug 44881 - Non-file inputs cannot be changed to file inputs via JavaScript
Summary: Non-file inputs cannot be changed to file inputs via JavaScript
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Minor
Assignee: Nobody
URL:
Keywords:
: 80213 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-30 12:03 PDT by Aryeh Gregor
Modified: 2013-01-30 08:42 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aryeh Gregor 2010-08-30 12:03:31 PDT
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.
Comment 1 Alexey Proskuryakov 2012-03-05 11:32:27 PST
*** Bug 80213 has been marked as a duplicate of this bug. ***