debug: add logging to handleExternalLinkClick

This commit is contained in:
2026-01-25 19:49:37 +11:00
parent fbb6ec213b
commit 847f755ba4

View File

@@ -54,8 +54,11 @@ const EMOJI_REG_G = new RegExp(`${URL_NEG_LB}(${EMOJI_PATTERN})`, 'g');
*/
const handleExternalLinkClick = (e: MouseEvent<HTMLAnchorElement>) => {
const href = e.currentTarget.href;
console.log('[handleExternalLinkClick] clicked link:', href);
if (href && (href.startsWith('http://') || href.startsWith('https://'))) {
e.preventDefault();
e.stopPropagation();
console.log('[handleExternalLinkClick] calling openExternalUrl');
openExternalUrl(href);
}
};