fix link click in reply
This commit is contained in:
parent
3ea993dcef
commit
bec63c409b
2 changed files with 13 additions and 2 deletions
|
|
@ -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>
|
||||
)
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue