With the utilization of angularJS, I have a modal set up to prompt an input file for uploading purposes.
Below is the function responsible for initiating the click:
function initiateFileUpload()
{
inputFile = document.createElement('input');
inputFile.type = 'file';
inputFile.onchange = fileSelected;
inputFile.click();
}
The issue that has been puzzling me is that upon the initial page load, when I open the modal, the trigger does not activate. However, if I close the modal and reopen it, the trigger successfully activates and continues to work until the next page load. What could potentially be causing this malfunction on the first page load?
This peculiar behavior seems to only occur in Chrome. In contrast, Firefox, Edge, and Internet Explorer all execute the trigger consistently, even after a page reload...