fix: mobile tooltip bug for files tab (#5722)

This commit is contained in:
Calum H.
2026-03-31 22:33:02 +02:00
committed by GitHub
parent 4224ef45b3
commit 5939d2a4e7

View File

@@ -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)
}