mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 09:59:48 +02:00
Always call preventDefault()
on onDrop
events. (#1043)
This commit is contained in:
committed by
Ian Storm Taylor
parent
f6ca563c4d
commit
8a6024fe85
@@ -488,11 +488,11 @@ class Content extends React.Component {
|
||||
*/
|
||||
|
||||
onDrop = (event) => {
|
||||
event.preventDefault()
|
||||
|
||||
if (this.props.readOnly) return
|
||||
if (!this.isInEditor(event.target)) return
|
||||
|
||||
event.preventDefault()
|
||||
|
||||
const window = getWindow(event.target)
|
||||
const { state, editor } = this.props
|
||||
const { nativeEvent } = event
|
||||
|
Reference in New Issue
Block a user