Skip to content

Document that using <input> inside a <label> triggers a 2nd click event #1107

@CWSites

Description

@CWSites

It seems that this issue has been re-introduced. I am still getting this error in Chrome from version 10.2 up to the latest version. Reproduction: https://codesandbox.io/s/pedantic-leakey-61oo3?file=/src/App.js

If you click on label and close the dialog either by choosing a file or canceling, another file select dialog is open.

On closer inspection, this issue is solved by passing noClick: true to the useDropzone hook. Maybe this behaviour should be enabled by default when the root element is a label element?

Originally posted by @Stopa in #182 (comment)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions