I call:
$('#encoderPreset').trigger('click');
on:
<input id="encoderPreset" type="file" name="name" style="display: none;" accept=".EPR" />
to open a file dialog. The problem is that the code keeps running and I need to use the resulting file path directly after. The only "fix" I found is to place an alert because then the code will pauze.
Know that the dialog is called inside a function that is called by a button.
I found a lot of similar questions but none of them seem to work for me.