<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>8248</bug_id>
          
          <creation_ts>2006-04-07 10:12:19 -0700</creation_ts>
          <short_desc>Can not clear file input field</short_desc>
          <delta_ts>2007-04-22 16:35:13 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>417.x</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Barry Kaplan">webkit</reporter>
          <assigned_to name="Darin Adler">darin</assigned_to>
          <cc>ap</cc>
    
    <cc>benjjamieson</cc>
    
    <cc>ian</cc>
    
    <cc>joost</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>38746</commentid>
    <comment_count>0</comment_count>
    <who name="Barry Kaplan">webkit</who>
    <bug_when>2006-04-07 10:12:19 -0700</bug_when>
    <thetext>I am using an AJAX to submit/upload a file to my server. This works perfectly. After I get the response I want to clear the form to allow the user to upload another file. This does not work.

1) Setting the value of the file input element to &quot;&quot; does nothing.
2) Calling form.reset does nothing
3) removing the element and adding a new file element does nothing.

Currently the only way to get this to work is by exploiting this bug# 5196.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43975</commentid>
    <comment_count>1</comment_count>
    <who name="Ben Jamieson">benjjamieson</who>
    <bug_when>2006-05-30 06:29:50 -0700</bug_when>
    <thetext>I&apos;m lost as to why this is marked as unconfirmed?

Its actually worse than the AJAX implementation outlined in the initial report, and affects any form, using just plain old HTML.

Create a form with a file upload element.

Select a file.

Now decide you don&apos;t want to upload a file at this stage and clear the field.

You can&apos;t. Confirmed...

...and a serious PIA for anyone using Safari on a regular basis. 

All other browsers let you simply delete the file path. Safari does not.

Please fix this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43976</commentid>
    <comment_count>2</comment_count>
    <who name="Joost de Valk (AlthA)">joost</who>
    <bug_when>2006-05-30 06:31:44 -0700</bug_when>
    <thetext>Well the reason for it being unconfirmed is quite simple. Nobody with the right to confirm it has yet confirmed it :). I&apos;ll look into it when i get home and have access to webkit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43977</commentid>
    <comment_count>3</comment_count>
    <who name="Ben Jamieson">benjjamieson</who>
    <bug_when>2006-05-30 06:49:24 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Well the reason for it being unconfirmed is quite simple. Nobody with the right
&gt; to confirm it has yet confirmed it :). 

Aah, that would make sense! &lt;grin&gt; 
Thanks for stopping by our little bug and taking the time to respond!

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44035</commentid>
    <comment_count>4</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2006-05-30 13:20:04 -0700</bug_when>
    <thetext>Resetting the form should clearly work.  Poking the value of a file upload control is not allowed in Safari.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13275</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-04-22 09:05:51 -0700</bug_when>
    <thetext>The three things mentioned here are potentially three separate bugs, so they might need separate bug reports. I&apos;m tackling (2) first.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13276</commentid>
    <comment_count>6</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-04-22 09:39:38 -0700</bug_when>
    <thetext>I have a patch that deals with issues (1) and (2). I think that issue (3) is a separate bug and needs a separate bug report and test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13229</commentid>
    <comment_count>7</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-04-22 16:35:13 -0700</bug_when>
    <thetext>Sending        WebCore/ChangeLog
Sending        WebCore/html/HTMLInputElement.cpp
Adding         WebCore/manual-tests/clear-input-file.html
Sending        WebCore/platform/FileChooser.cpp
Sending        WebCore/platform/FileChooser.h
Sending        WebCore/rendering/RenderFileUploadControl.cpp
Transmitting file data ......
Committed revision 21010.
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>