From cc7e4b19f429da1952d9920f90495be19375bd7e Mon Sep 17 00:00:00 2001 From: Egor Date: Thu, 22 Jan 2026 23:45:10 +0300 Subject: [PATCH] Update ConnectionModal.tsx --- src/components/ConnectionModal.tsx | 31 +++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/components/ConnectionModal.tsx b/src/components/ConnectionModal.tsx index e7c426d..bab8768 100644 --- a/src/components/ConnectionModal.tsx +++ b/src/components/ConnectionModal.tsx @@ -1,4 +1,4 @@ -import { useState, useMemo, useEffect, useCallback } from 'react' +import { useState, useMemo, useEffect, useCallback, useRef } from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { useQuery } from '@tanstack/react-query' @@ -136,6 +136,22 @@ export default function ConnectionModal({ onClose }: ConnectionModalProps) { const { isTelegramWebApp, isFullscreen, safeAreaInset, contentSafeAreaInset, webApp } = useTelegramWebApp() const isMobileScreen = useIsMobile() const isMobile = isMobileScreen + const scrollContainerRef = useRef(null) + + // Prevent scroll events from bubbling to parent/Telegram + const handleScrollContainerWheel = useCallback((e: React.WheelEvent) => { + const container = e.currentTarget + const { scrollTop, scrollHeight, clientHeight } = container + const isAtTop = scrollTop === 0 + const isAtBottom = scrollTop + clientHeight >= scrollHeight - 1 + + // Prevent scroll propagation when not at boundaries, or when scrolling away from boundary + if ((!isAtTop && !isAtBottom) || + (isAtTop && e.deltaY > 0) || + (isAtBottom && e.deltaY < 0)) { + e.stopPropagation() + } + }, []) const safeBottom = isTelegramWebApp ? Math.max(safeAreaInset.bottom, contentSafeAreaInset.bottom) : 0 const safeTop = isTelegramWebApp ? Math.max(safeAreaInset.top, contentSafeAreaInset.top) + (isFullscreen ? 45 : 0) : 0 @@ -324,7 +340,12 @@ export default function ConnectionModal({ onClose }: ConnectionModalProps) {

{t('subscription.connection.selectApp')}

-
+
{availablePlatforms.map(platform => { const apps = appConfig.platforms[platform] if (!apps?.length) return null @@ -417,7 +438,11 @@ export default function ConnectionModal({ onClose }: ConnectionModalProps) {
-
+
{selectedApp?.installationStep && (