Skip to content

[upload] Keep upload button enabled for replacing file (with maxfiles=1) #562

Open
@rolfsmeds

Description

@rolfsmeds

Description

When using Upload with maxfiles=1, the Upload button becomes disabled once a file is uploaded, until the file is removed with the x button next to the file. This is confusing as it deviates from the way file uploads typically work on the web, and from the way input fields work*, and the x button can take quite a while to even notice (not to mention a11y issues). It also makes it cumbersome to replace the previously uploaded file.

Either the default behavior should be changed to be less confusing and cumbersome, or the proposed behavior should be available as an option.

Expected outcome

After uploading a file, the Upload button remains enabled after uploading a file. Uploading another file replaces the previously uploaded file.

Actual outcome

Upload button is disabled, and the x must be clicked to clear discard the uploaded file and re-enable the button.

Steps to reproduce

1st example in https://vaadin.com/components/vaadin-upload/java-examples

  1. Upload a file
  2. Observe the Upload button becoming disabled.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions