ChatMessage: fix double-closure

This commit is contained in:
Enrico Ros
2024-04-11 18:22:12 -07:00
parent 29ddb3f58d
commit 9d690f4219
@@ -425,6 +425,7 @@ export function ChatMessage(props: {
// Selection Toolbar
const handleCloseToolbar = React.useCallback((anchorEl: HTMLElement) => {
window.getSelection()?.removeAllRanges?.();
try {
document.body.removeChild(anchorEl);
} catch (e) {