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) {
|
handleDragEnter (e, key) {
|
||||||
|
e.preventDefault()
|
||||||
if (this.state.draggedOver === key) { return }
|
if (this.state.draggedOver === key) { return }
|
||||||
this.setState({
|
this.setState({
|
||||||
draggedOver: key
|
draggedOver: key
|
||||||
@@ -240,6 +241,7 @@ class StorageItem extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleDragLeave (e) {
|
handleDragLeave (e) {
|
||||||
|
e.preventDefault()
|
||||||
if (this.state.draggedOver === null) { return }
|
if (this.state.draggedOver === null) { return }
|
||||||
this.setState({
|
this.setState({
|
||||||
draggedOver: null
|
draggedOver: null
|
||||||
@@ -268,6 +270,7 @@ class StorageItem extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleDrop (e, storage, folder, dispatch, location) {
|
handleDrop (e, storage, folder, dispatch, location) {
|
||||||
|
e.preventDefault()
|
||||||
if (this.state.draggedOver !== null) {
|
if (this.state.draggedOver !== null) {
|
||||||
this.setState({
|
this.setState({
|
||||||
draggedOver: null
|
draggedOver: null
|
||||||
@@ -307,15 +310,12 @@ class StorageItem extends React.Component {
|
|||||||
isFolded={isFolded}
|
isFolded={isFolded}
|
||||||
noteCount={noteCount}
|
noteCount={noteCount}
|
||||||
handleDrop={(e) => {
|
handleDrop={(e) => {
|
||||||
e.preventDefault()
|
|
||||||
this.handleDrop(e, storage, folder, dispatch, location)
|
this.handleDrop(e, storage, folder, dispatch, location)
|
||||||
}}
|
}}
|
||||||
handleDragEnter={(e) => {
|
handleDragEnter={(e) => {
|
||||||
e.preventDefault()
|
|
||||||
this.handleDragEnter(e, folder.key)
|
this.handleDragEnter(e, folder.key)
|
||||||
}}
|
}}
|
||||||
handleDragLeave={(e) => {
|
handleDragLeave={(e) => {
|
||||||
e.preventDefault()
|
|
||||||
this.handleDragLeave(e, folder)
|
this.handleDragLeave(e, folder)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user