fix: mobile tooltip bug for files tab (#5722)
This commit is contained in:
@@ -75,6 +75,7 @@ function cleanup() {
|
||||
dragStarted.value = false
|
||||
document.removeEventListener('pointermove', onPointerMove)
|
||||
document.removeEventListener('pointerup', onPointerUp)
|
||||
document.removeEventListener('pointercancel', onPointerCancel)
|
||||
if (wasDrag) {
|
||||
clickSuppressed = true
|
||||
requestAnimationFrame(() => {
|
||||
@@ -85,6 +86,10 @@ function cleanup() {
|
||||
|
||||
let onDropCallback: ((source: FileDragData, destination: string) => void) | null = null
|
||||
|
||||
function onPointerCancel() {
|
||||
cleanup()
|
||||
}
|
||||
|
||||
function onPointerUp() {
|
||||
if (dragStarted.value && activeDrag.value && dragTarget.value) {
|
||||
const src = activeDrag.value
|
||||
@@ -111,4 +116,5 @@ export function startFileDrag(
|
||||
|
||||
document.addEventListener('pointermove', onPointerMove)
|
||||
document.addEventListener('pointerup', onPointerUp)
|
||||
document.addEventListener('pointercancel', onPointerCancel)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user