This commit is contained in:
Shea Duma committed 2026-04-12 04:02:21 +03:00
1 parent 6a895f8de1
commit e16d96fab4
3 files changed
+8 -1

No files matched your search

@@ -0,0 +1,5 @@
---
default: fix
---
Fix spam-clicking abbreviations crashing sable
+2 -1
View File
@@ -77,8 +77,9 @@ function AbbreviationTerm({ text, definition }: AbbreviationTermProps) {
const [anchor, setAnchor] = useState<RectCords | undefined>();
const handleClick: MouseEventHandler<HTMLElement> = (e) => {
if (e.currentTarget === null) return;
e.stopPropagation();
setAnchor((prev) => (prev ? undefined : e.currentTarget.getBoundingClientRect()));
setAnchor((prev) => (prev ? undefined : e.currentTarget?.getBoundingClientRect()));
};
// On mobile, tapping an abbreviation pins the tooltip open.
+1
View File
@@ -494,6 +494,7 @@ export function ThreadDrawer({ room, threadRootId, onClose, overlay }: ThreadDra
const handleUserClick: MouseEventHandler<HTMLButtonElement> = useCallback(
(evt) => {
if (!evt.currentTarget) return;
evt.preventDefault();
evt.stopPropagation();
const userId = evt.currentTarget.getAttribute('data-user-id');