joshdschneider/formation

File upload opens files folder twice

Closed this issue · 5 comments

I was exploring your library and came across the file upload component. If you click it twice, it opens your file explorer twice as well. Is this a native behaviour or something that could be prevented on your end?

Anyway, amazing work! Super clean library.

Also, interesting approach on your components using classes. I prefer them as functions, but I also understand why you approach this with that architecture.

Thanks @danielsimao! I assume it's native behavior but I'll look into it. What browser/OS are you using?

@joshdschneider Im on macOS using Chrome.

I was able to reproduce the error in BrowserStack. I tried disabling the file input onClick but it wouldn't open the dialog. Then, I tried disabling it onChange and it didn't make any difference. Going to chalk this one up to a browser bug, but let me know if you find a solution—I'd be happy to implement it.

Also, interesting approach on your components using classes. I prefer them as functions, but I also understand why you approach this with that architecture.

Yea I hear ya! I thought it'd be a little cleaner and more manageable as classes, but I'll probably end up rewriting them as functional components. Would eventually like to expand the library to offer some useful custom hooks.