From 6591d503d4b1c713d35fa449366940a22cb83d8c Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sun, 23 Nov 2025 01:16:07 +0100 Subject: [PATCH] Restrict context menu overlay to iOS only The tap-blocking overlay is only needed on iOS to dismiss the context menu on tap. Removed it from macOS and tvOS where it was either blocking normal interactions or not functional due to platform limitations. --- Shared/Views/VideoContextMenuView.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Shared/Views/VideoContextMenuView.swift b/Shared/Views/VideoContextMenuView.swift index 2a50da77..c02c52b6 100644 --- a/Shared/Views/VideoContextMenuView.swift +++ b/Shared/Views/VideoContextMenuView.swift @@ -33,23 +33,21 @@ struct VideoContextMenuView: View { var body: some View { ZStack { + #if os(iOS) // Conditional overlay to block taps on underlying views if isOverlayVisible { Color.clear .contentShape(Rectangle()) - #if !os(tvOS) - // This is not available on tvOS < 16 so we leave out. - // TODO: remove #if when setting the minimum deployment target to >= 16 .onTapGesture { // Dismiss overlay without triggering other interactions isOverlayVisible = false } - #endif .ignoresSafeArea() // Ensure overlay covers the entire screen .accessibilityLabel("Dismiss context menu") .accessibilityHint("Tap to close the context") .accessibilityAddTraits(.isButton) } + #endif if video.videoID != Video.fixtureID { contextMenu