File Explorer not opening in Firefox calling using interop js #24405
Unanswered
JeyanthVictory
asked this question in
General
Replies: 1 comment
-
Hi There, Anyone please help me to resolve it please. Thanks, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi There,
I encountered an issue related to opening file explorer window on a button click using interop.
In my application, I have a button and an input type of file both are hidden state wrapped with div. I also have a span with
<a>
element which displays Browse text like below.When I click the Browse (i.e.,
<a>
tag), I am calling the click method of button which inturn calls the click method of input type file in order to show the file explorer window.Since I could not access DOM, I am using interop to achieve this. That is, I am invoking the interop file in the click handler of element.
So my click handler in the interop js file will look like this.
window.onUploadClick = () => { document.getElementsByClassName('file-wrap')[0].querySelector('button').click(); document.getElementById("click").addEventListener("click", function (e) { document.getElementById('file').click(); }) }
Now the problem is , file explorer is opening in chrome but not in Firefox.
To demonstrate the problem, here I attached a simple project.
FileUpload.zip
Any help or solution would be greatly appreciated.
Thanks,
Jeyanth.
Beta Was this translation helpful? Give feedback.
All reactions