From 0364e8dc5e10432be66f3d9756c21dc1118e765e Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Sat, 9 May 2026 12:44:07 +0700 Subject: [PATCH] fix(app): preventDefault in capture phase for MarkdownLink anchor Pressable's click handler calls stopPropagation, so the bubble-phase preventDefault on the wrapping never fired and the Electron view navigated to the href in addition to the existing helper opening it in the OS browser. Move preventDefault to onClickCapture (and onAuxClickCapture for middle-click) so it always runs first. The existing Pressable.onPress helper remains the only path that actually opens links. --- packages/app/src/components/message.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/app/src/components/message.tsx b/packages/app/src/components/message.tsx index 15abb649d..9cddda707 100644 --- a/packages/app/src/components/message.tsx +++ b/packages/app/src/components/message.tsx @@ -908,7 +908,12 @@ function MarkdownLink({ } return ( - +