Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-dropzone

Package Overview
Dependencies
Maintainers
2
Versions
189
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dropzone - npm Package Compare versions

Comparing version 10.1.2 to 10.1.3

6

dist/es/index.js

@@ -491,3 +491,7 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }

var onClickCb = useCallback(function () {
var onClickCb = useCallback(function (event) {
// Prevent click events from propagating to the <input> when the click event
// originated from a <label> that wraps the dropzone
event.preventDefault();
if (noClick) {

@@ -494,0 +498,0 @@ return;

2

package.json

@@ -168,3 +168,3 @@ {

},
"version": "10.1.2",
"version": "10.1.3",
"engines": {

@@ -171,0 +171,0 @@ "node": ">= 8"

@@ -457,17 +457,24 @@ /* eslint prefer-template: 0 */

// Cb to open the file dialog when click occurs on the dropzone
const onClickCb = useCallback(() => {
if (noClick) {
return
}
const onClickCb = useCallback(
event => {
// Prevent click events from propagating to the <input> when the click event
// originated from a <label> that wraps the dropzone
event.preventDefault()
// In IE11/Edge the file-browser dialog is blocking, therefore, use setTimeout()
// to ensure React can handle state changes
// See: https://github.com/react-dropzone/react-dropzone/issues/450
if (isIeOrEdge()) {
setTimeout(openFileDialog, 0)
} else {
openFileDialog()
}
}, [inputRef, noClick])
if (noClick) {
return
}
// In IE11/Edge the file-browser dialog is blocking, therefore, use setTimeout()
// to ensure React can handle state changes
// See: https://github.com/react-dropzone/react-dropzone/issues/450
if (isIeOrEdge()) {
setTimeout(openFileDialog, 0)
} else {
openFileDialog()
}
},
[inputRef, noClick]
)
const [dragTargets, setDragTargets] = useState([])

@@ -474,0 +481,0 @@ const onDocumentDrop = event => {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc