Results 1 to 8 of 8

Thread: File Field Clear Icon

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    8

    Default File Field Clear Icon

    Clear Icon doesn't show up for 2.3 file field when a file is selected.

    Need to click "Choose File" then cancel out of dialog to clear the value.

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236

    Default

    Also note that calling Ext.field.File#reset() does not clear the file field's value as expected.

    The only way I've been able to clear the file field's value is by calling .reset() on an underlying <form> element's reset() method, provided it is contained in a <form> (i.e. Ext.form.Panel).

  4. #4
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108

    Default

    According to Engineering this is a result browser security issue and cannot be fixed. We are not allowed to modify the contents of a input tag with the type of file.
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

  5. #5
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236

    Default

    @fmoseley: This behaviour is completely unexpected though. As a user one would expect to be able to reset every (Form) field regardless of browser security restrictions.

    A possible workaround that could be included to address this is to temporarily wrap the underlying file input field in a <form> element:
    http://stackoverflow.com/a/13351234

    Could Engineering explore this as a possible workaround?

  6. #6
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108

    Default

    I will pass this along to engineering.
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

  7. #7
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236

    Default

    Thanks @fmoseley.

  8. #8
    Sencha User
    Join Date
    Mar 2013
    Posts
    40

    Default

    I know that it's an old topic but I notice this problem also in 2.4.1

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •