KarimMokhtar / react-drag-drop-files

Light and simple Reactjs drag and drop files library to use with very flexible options to change, so you put whatever the design you want for your drop-area. Users can drag and drop or even select the file anywhere in the window.
MIT License
245 stars 86 forks source link

[BUG] A black border box flashing when focusing #121

Open bxclib2 opened 1 year ago

bxclib2 commented 1 year ago

Hi, I find a bug that after I drag file it will remove a black border box.

I find the bug is added by this commit [https://github.com/KarimMokhtar/react-drag-drop-files/commit/446e940b8e92064a999352b9e973934fd97a89cc]()

In fact I don't know why :focus-within is added. This caused the black border box. Usually when I uploaded the file the box will be there until I clicked somewhere else.

I suggest to remove the

&:focus-within {
    outline: 2px solid black;
}
Screenshot 2023-06-06 at 4 09 38 PM

Is there any concerns here?

Thank you and regards

spencey-b commented 1 year ago

For those looking for a work around, you can override this unexpected behavior by setting classes with a class implementing outline: none !important.

Just passing a class in: classes="outline-none"

bxclib2 commented 9 months ago

Sorry i wonder how to use the workaround? still confusing