From 4973ac48edbbc5cbd4258c10af32237beee1d731 Mon Sep 17 00:00:00 2001 From: Dylan Audius Date: Fri, 15 May 2026 15:29:27 -0700 Subject: [PATCH] fix(mobile): comment kebab menu desyncs after close, requiring extra taps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The kebab handler toggled isOpen and isVisible together, but these two pieces of state are intentionally separated: isOpen drives the open/close animation while isVisible controls when the drawer is mounted (kept around during the close animation, then unmounted in onClosed). Toggling both in lock-step lets a tap during the close animation flip them out of sync, leaving the drawer unmounted while state thinks it is open — subsequent taps then need two presses before the menu visibly appears. Make handlePress explicitly open the menu. Dismissal is already handled by onClose/onClosed (row tap, backdrop tap, or swipe down). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../mobile/src/components/comments/CommentOverflowMenu.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mobile/src/components/comments/CommentOverflowMenu.tsx b/packages/mobile/src/components/comments/CommentOverflowMenu.tsx index 305298754eb..e9abb19f7a7 100644 --- a/packages/mobile/src/components/comments/CommentOverflowMenu.tsx +++ b/packages/mobile/src/components/comments/CommentOverflowMenu.tsx @@ -238,8 +238,8 @@ export const CommentOverflowMenu = (props: CommentOverflowMenuProps) => { }, [deleteComment, id, parentCommentId, toast]) const handlePress = useCallback(() => { - setIsOpen(!isOpen) - setIsVisible(!isVisible) + setIsOpen(true) + setIsVisible(true) trackEvent( make({ @@ -247,7 +247,7 @@ export const CommentOverflowMenu = (props: CommentOverflowMenuProps) => { commentId: id }) ) - }, [isOpen, isVisible, id]) + }, [id]) return ( <>