From 5ace70d0dce8e999b7d1d10c991cd09f8f5d651e Mon Sep 17 00:00:00 2001 From: kazachilo Date: Wed, 26 Mar 2025 11:15:40 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BF=D1=80=D0=BE=D0=B1=D0=BB=D0=B5?= =?UTF-8?q?=D0=BC=D1=8B=20=D1=81=20UI=20=D0=B8=20=D1=81=D0=BA=D1=80=D0=BE?= =?UTF-8?q?=D0=BB=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/shared/ImageWithFallback.module.css | 3 ++- src/components/shared/ImageWithFallback.tsx | 6 ------ src/screens/Gallery.module.css | 2 ++ src/screens/Gallery.tsx | 5 ++++- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/shared/ImageWithFallback.module.css b/src/components/shared/ImageWithFallback.module.css index 52e142e..f89eb6e 100644 --- a/src/components/shared/ImageWithFallback.module.css +++ b/src/components/shared/ImageWithFallback.module.css @@ -7,7 +7,6 @@ display: flex; justify-content: center; align-items: center; - touch-action: pan-y; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; @@ -19,6 +18,8 @@ object-fit: cover; transition: opacity 0.3s ease; pointer-events: none; + -webkit-user-drag: none; + user-drag: none; } .hidden { diff --git a/src/components/shared/ImageWithFallback.tsx b/src/components/shared/ImageWithFallback.tsx index dc8fc2b..4ca3ae1 100644 --- a/src/components/shared/ImageWithFallback.tsx +++ b/src/components/shared/ImageWithFallback.tsx @@ -114,12 +114,6 @@ const ImageWithFallback: React.FC = ({ className={`${styles.container} ${className}`} onClick={handleClick} onContextMenu={onContextMenu} - onTouchStart={(e) => { - // Предотвращаем стандартное поведение только если не в режиме удаления - if (!isDeleteMode && onContextMenu) { - e.preventDefault(); - } - }} > {/* Показываем индикатор загрузки, если изображение загружается */} {loading && ( diff --git a/src/screens/Gallery.module.css b/src/screens/Gallery.module.css index 5d20484..acc04f8 100644 --- a/src/screens/Gallery.module.css +++ b/src/screens/Gallery.module.css @@ -20,6 +20,8 @@ -webkit-overflow-scrolling: touch; /* Для плавного скролла на iOS */ transform: translateY(var(--pull-distance, 0px)); transition: transform 0.3s ease-out; + overscroll-behavior: contain; + will-change: transform; } .refreshIndicator { diff --git a/src/screens/Gallery.tsx b/src/screens/Gallery.tsx index 1ebe9f8..bbb50b4 100644 --- a/src/screens/Gallery.tsx +++ b/src/screens/Gallery.tsx @@ -226,7 +226,10 @@ const GalleryScreen: React.FC = () => { }, [pendingTasks.length]); // Зависимость от количества задач return ( -
+
e.preventDefault()} + >