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

fix: Click event firing twice in Next.js applications #62

Closed room9design closed 2 years ago

room9design commented 2 years ago

Summary

This package would have some strange behaviors in Next.js where the file upload window would pop up twice when the upload button was clicked. Upon investigation it was seen that the click event fired twice when the component was clicked. Adding a event.stopPropagaiton to the UploadWrapper and the input component stops this behavior, allowing the component to function as intended.

Key Changes

Check List

room9design commented 2 years ago

Added necessary colon to title.

room9design commented 2 years ago

All necessary changes to pass semantic checks have been completed. Please revisit this pull request.

KarimMokhtar commented 2 years ago

@room9design Thank you so much for your contribution. could you please fix the semantic pull request issue?

room9design commented 2 years ago

@KarimMokhtar I'm confused, is there a place other than inside Github where I need to change the pull request title?

KarimMokhtar commented 2 years ago

@KarimMokhtar I'm confused, is there a place other than inside Github where I need to change the pull request title?

I think you need to change the commit itself from “Fix” to “fix”

room9design commented 2 years ago

@KarimMokhtar Recommitted with updated commit message.