fix(web): keep chat context menu actions clickable
Some checks are pending
CI / test (push) Has started running
Some checks are pending
CI / test (push) Has started running
This commit is contained in:
@@ -168,13 +168,6 @@ export function ChatList() {
|
||||
useEffect(() => {
|
||||
const onPointerDown = (event: MouseEvent) => {
|
||||
const target = event.target as Node | null;
|
||||
if (ctxChatId) {
|
||||
const inCtxMenu = ctxMenuRef.current?.contains(target ?? null) ?? false;
|
||||
if (!inCtxMenu) {
|
||||
setCtxChatId(null);
|
||||
setCtxPos(null);
|
||||
}
|
||||
}
|
||||
if (menuOpen) {
|
||||
const inMenu = burgerMenuRef.current?.contains(target ?? null) ?? false;
|
||||
const inButton = burgerButtonRef.current?.contains(target ?? null) ?? false;
|
||||
@@ -185,7 +178,7 @@ export function ChatList() {
|
||||
};
|
||||
document.addEventListener("mousedown", onPointerDown);
|
||||
return () => document.removeEventListener("mousedown", onPointerDown);
|
||||
}, [ctxChatId, menuOpen]);
|
||||
}, [menuOpen]);
|
||||
|
||||
useEffect(() => {
|
||||
applyAppearancePreferences(getAppPreferences());
|
||||
|
||||
Reference in New Issue
Block a user