mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 18:09:49 +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) => {
|
onDrop = (event) => {
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
if (this.props.readOnly) return
|
if (this.props.readOnly) return
|
||||||
if (!this.isInEditor(event.target)) return
|
if (!this.isInEditor(event.target)) return
|
||||||
|
|
||||||
event.preventDefault()
|
|
||||||
|
|
||||||
const window = getWindow(event.target)
|
const window = getWindow(event.target)
|
||||||
const { state, editor } = this.props
|
const { state, editor } = this.props
|
||||||
const { nativeEvent } = event
|
const { nativeEvent } = event
|
||||||
|
Reference in New Issue
Block a user