From 15678cf96a6a8c4e2bef7d76b5aaedb3637cfb4a Mon Sep 17 00:00:00 2001 From: MacRimi Date: Wed, 10 Dec 2025 23:15:50 +0100 Subject: [PATCH] Update script-terminal-modal.tsx --- AppImage/components/script-terminal-modal.tsx | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/AppImage/components/script-terminal-modal.tsx b/AppImage/components/script-terminal-modal.tsx index 36787e2..ae41fe5 100644 --- a/AppImage/components/script-terminal-modal.tsx +++ b/AppImage/components/script-terminal-modal.tsx @@ -413,6 +413,10 @@ export function ScriptTerminalModal({ } const handleResizeStart = (e: React.MouseEvent | React.TouchEvent) => { + if (window.innerWidth < 640 && !isTablet) { + return + } + e.preventDefault() e.stopPropagation() @@ -420,10 +424,11 @@ export function ScriptTerminalModal({ const startHeight = modalHeight const handleMove = (moveEvent: MouseEvent | TouchEvent) => { - moveEvent.preventDefault() // Añadido preventDefault en cada move para mejor soporte táctil + moveEvent.preventDefault() + moveEvent.stopPropagation() const currentY = "touches" in moveEvent ? moveEvent.touches[0].clientY : moveEvent.clientY const deltaY = currentY - startY - const newHeight = Math.max(300, Math.min(2400, startHeight + deltaY)) // Restaurado a píxeles con límites razonables + const newHeight = Math.max(300, Math.min(2400, startHeight + deltaY)) setModalHeight(newHeight) @@ -444,17 +449,17 @@ export function ScriptTerminalModal({ } const handleEnd = () => { - document.removeEventListener("mousemove", handleMove as any) + document.removeEventListener("mousemove", handleMove) document.removeEventListener("mouseup", handleEnd) - document.removeEventListener("touchmove", handleMove as any) + document.removeEventListener("touchmove", handleMove) document.removeEventListener("touchend", handleEnd) localStorage.setItem("scriptModalHeight", modalHeight.toString()) } - document.addEventListener("mousemove", handleMove as any) + document.addEventListener("mousemove", handleMove) document.addEventListener("mouseup", handleEnd) - document.addEventListener("touchmove", handleMove as any, { passive: false }) + document.addEventListener("touchmove", handleMove, { passive: false }) document.addEventListener("touchend", handleEnd) } @@ -496,11 +501,11 @@ export function ScriptTerminalModal({ )} - {(isTablet || (!isMobile && !isTablet)) && ( // Barra visible en tablet y escritorio + {(isTablet || (!isMobile && !isTablet)) && (