mirror of
https://github.com/cinnyapp/cinny.git
synced 2026-11-26 03:46:36 -08:00
fix link click in reply
This commit is contained in:
1 parent
3ea993dcef
commit
bec63c409b
2 files changed
+13
-2
No files matched your search
@@ -44,11 +44,22 @@ export function ReplyMessage({
|
||||
}
|
||||
};
|
||||
|
||||
const handleClick: MouseEventHandler = (evt) => {
|
||||
const target = evt.target as HTMLElement;
|
||||
|
||||
if (target.closest('a')) {
|
||||
evt.stopPropagation();
|
||||
return;
|
||||
}
|
||||
|
||||
onClick?.();
|
||||
};
|
||||
|
||||
const commonProps = onClick
|
||||
? {
|
||||
role: 'button' as const,
|
||||
tabIndex: 0,
|
||||
onClick,
|
||||
onClick: handleClick,
|
||||
onKeyDown: handleKeyDown,
|
||||
className: HoverUnderline,
|
||||
style: { cursor: 'pointer' },
|
||||
|
||||
@@ -29,7 +29,7 @@ export const UnsupportedMessageEventType = as<'div', { eventType: string; childr
|
||||
({ eventType, ...props }, ref) => (
|
||||
<Box as="span" alignItems="Center" gap="100" {...props} ref={ref}>
|
||||
<Icon size="50" src={Icons.Code} />
|
||||
Unsupported <code className={Code}>{eventType}</code> event
|
||||
Sent <code className={Code}>{eventType}</code> event
|
||||
</Box>
|
||||
)
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user