mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
fix: cursor blocking ghost text content during dragging
This commit is contained in:
parent
f360207e94
commit
c24cc1c3ed
3 changed files with 10 additions and 4 deletions
|
@ -58,7 +58,6 @@ const onDragOver = (event: DragEvent) => {
|
|||
if (!acceptsDrop(event)) return false
|
||||
|
||||
event.preventDefault()
|
||||
event.dataTransfer!.dropEffect = 'move'
|
||||
droppable.value = true
|
||||
opened.value = true
|
||||
}
|
||||
|
@ -84,7 +83,6 @@ const onDragOverHatch = (event: DragEvent) => {
|
|||
if (!acceptsDrop(event)) return false
|
||||
|
||||
event.preventDefault()
|
||||
event.dataTransfer!.dropEffect = 'move'
|
||||
droppableOnHatch.value = true
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,14 @@ import { faCaretDown, faCaretUp } from '@fortawesome/free-solid-svg-icons'
|
|||
import { computed, nextTick, onMounted, Ref, ref, watch } from 'vue'
|
||||
import { eventBus, requireInjection } from '@/utils'
|
||||
import { useDraggable, useDroppable } from '@/composables'
|
||||
import { SelectedSongsKey, SongListConfigKey, SongListFilterKeywordsKey, SongListSortFieldKey, SongListSortOrderKey, SongsKey } from '@/symbols'
|
||||
import {
|
||||
SelectedSongsKey,
|
||||
SongListConfigKey,
|
||||
SongListFilterKeywordsKey,
|
||||
SongListSortFieldKey,
|
||||
SongListSortOrderKey,
|
||||
SongsKey
|
||||
} from '@/symbols'
|
||||
|
||||
import VirtualScroller from '@/components/ui/VirtualScroller.vue'
|
||||
import SongListItem from '@/components/song/SongListItem.vue'
|
||||
|
@ -274,7 +281,6 @@ const onDragEnter = (event: DragEvent) => {
|
|||
|
||||
if (acceptsDrop(event)) {
|
||||
(event.target as HTMLElement).closest('.song-item')?.classList.add('droppable')
|
||||
event.dataTransfer!.dropEffect = 'move'
|
||||
}
|
||||
|
||||
return false
|
||||
|
|
|
@ -33,6 +33,8 @@ export const useDraggable = (type: DraggableType) => {
|
|||
return
|
||||
}
|
||||
|
||||
event.dataTransfer.effectAllowed = 'copyMove'
|
||||
|
||||
let text: string
|
||||
let data: any
|
||||
|
||||
|
|
Loading…
Reference in a new issue