Fix chrome and edge file input click issue. Closes #26

This commit is contained in:
Chris McCord 2022-02-03 11:42:58 -05:00
parent 3385315cb6
commit cad951a647

View file

@ -49,7 +49,7 @@
</svg>
<div class="flex text-sm text-gray-600">
<label for="file-upload" class="relative cursor-pointer bg-white rounded-md font-medium text-indigo-600 hover:text-indigo-500 focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-indigo-500">
<span phx-click={JS.dispatch("click", to: "##{@uploads.mp3.ref}")}>Upload files</span>
<span phx-click={js_exec("##{@uploads.mp3.ref}", "click", [])}>Upload files</span>
<%= live_file_input @uploads.mp3, class: "sr-only" %>
</label>
<p class="pl-1">or drag and drop</p>