dropzone icon indicating copy to clipboard operation
dropzone copied to clipboard

If the button contains an icon, the icon isn't clickable.

Open RichardNeill opened this issue 3 years ago • 0 comments

Describe the bug If the button contains an icon, then the icon isn't clickable.

To Reproduce

  1. 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".
  1. Clicking the button with the mouse on the word "Upload" works as expected, opening the file-picker.

  2. BUT, clicking on the icon is simply ignored: the file-picker doesn't open.

  3. 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!

RichardNeill avatar Apr 12 '22 21:04 RichardNeill