fix(app): stop mobile web sidebars from intercepting taps when closed
This commit is contained in:
@@ -240,8 +240,9 @@ export function ExplorerSidebar({ serverId, agentId, cwd, isGit }: ExplorerSideb
|
|||||||
width: resizeWidth.value,
|
width: resizeWidth.value,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Mobile: full-screen overlay with gesture
|
// Mobile: full-screen overlay with gesture.
|
||||||
const overlayPointerEvents = Platform.OS === "web" ? "auto" : "box-none";
|
// On web, keep it interactive only while open so closed sidebars don't eat taps.
|
||||||
|
const overlayPointerEvents = Platform.OS === "web" ? (isOpen ? "auto" : "none") : "box-none";
|
||||||
|
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -325,8 +325,9 @@ export function SlidingSidebar({ selectedAgentId }: SlidingSidebarProps) {
|
|||||||
|
|
||||||
|
|
||||||
// Render mobile sidebar
|
// Render mobile sidebar
|
||||||
// On web, use "auto" instead of "box-none" because web's pointer-events: none blocks scroll
|
// On web, keep the overlay interactive only while the sidebar is open.
|
||||||
const overlayPointerEvents = Platform.OS === "web" ? "auto" : "box-none";
|
// This preserves swipe/scroll behavior without blocking taps when closed.
|
||||||
|
const overlayPointerEvents = Platform.OS === "web" ? (isOpen ? "auto" : "none") : "box-none";
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
return (
|
return (
|
||||||
<View style={StyleSheet.absoluteFillObject} pointerEvents={overlayPointerEvents}>
|
<View style={StyleSheet.absoluteFillObject} pointerEvents={overlayPointerEvents}>
|
||||||
|
|||||||
Reference in New Issue
Block a user