mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Moving prevent default
This commit is contained in:
@@ -233,6 +233,7 @@ class StorageItem extends React.Component {
|
||||
}
|
||||
|
||||
handleDragEnter (e, key) {
|
||||
e.preventDefault()
|
||||
if (this.state.draggedOver === key) { return }
|
||||
this.setState({
|
||||
draggedOver: key
|
||||
@@ -240,6 +241,7 @@ class StorageItem extends React.Component {
|
||||
}
|
||||
|
||||
handleDragLeave (e) {
|
||||
e.preventDefault()
|
||||
if (this.state.draggedOver === null) { return }
|
||||
this.setState({
|
||||
draggedOver: null
|
||||
@@ -268,6 +270,7 @@ class StorageItem extends React.Component {
|
||||
}
|
||||
|
||||
handleDrop (e, storage, folder, dispatch, location) {
|
||||
e.preventDefault()
|
||||
if (this.state.draggedOver !== null) {
|
||||
this.setState({
|
||||
draggedOver: null
|
||||
@@ -307,15 +310,12 @@ class StorageItem extends React.Component {
|
||||
isFolded={isFolded}
|
||||
noteCount={noteCount}
|
||||
handleDrop={(e) => {
|
||||
e.preventDefault()
|
||||
this.handleDrop(e, storage, folder, dispatch, location)
|
||||
}}
|
||||
handleDragEnter={(e) => {
|
||||
e.preventDefault()
|
||||
this.handleDragEnter(e, folder.key)
|
||||
}}
|
||||
handleDragLeave={(e) => {
|
||||
e.preventDefault()
|
||||
this.handleDragLeave(e, folder)
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user