dropzone
dropzone copied to clipboard
If the button contains an icon, the icon isn't clickable.
Describe the bug If the button contains an icon, then the icon isn't clickable.
To Reproduce
- I have:
<button class='btn btn-primary' id='dropzone-upload-btn-1'><span class='fas fa-upload' '></span>Upload</button>
which is bound to Dropzone by "button#dropzone-upload-btn-1".
-
Clicking the button with the mouse on the word "Upload" works as expected, opening the file-picker.
-
BUT, clicking on the icon is simply ignored: the file-picker doesn't open.
-
In fact, any element I tried was ignored, e.g.
<button ... >Thispartworks <i>thispartdoesnt</i> thispartworksagain</button>
Expected behavior Clicking anywhere on the button should work.
Browser / OS: Both Chrome and Firefox
Additional context I see the same bug in both 5.7.3 and 6.0.0.beta2 .
Workaround
Add this to the <span>:
onclick='this.parentNode.click()
Thanks!