Forum Panel: Close on Esc (#2360)
This commit is contained in:
parent
568e98a083
commit
e5537cbbc0
@ -332,10 +332,10 @@ const LeftColumn: FC<StateProps> = ({
|
|||||||
}, [forumPanelChatId, setGlobalSearchChatId, setGlobalSearchQuery]);
|
}, [forumPanelChatId, setGlobalSearchChatId, setGlobalSearchQuery]);
|
||||||
|
|
||||||
useEffect(
|
useEffect(
|
||||||
() => (content !== LeftColumnContent.ChatList || (isFirstChatFolderActive && !isChatOpen)
|
() => (content !== LeftColumnContent.ChatList || (isFirstChatFolderActive && !isChatOpen && !isForumPanelOpen)
|
||||||
? captureEscKeyListener(() => handleReset())
|
? captureEscKeyListener(() => handleReset())
|
||||||
: undefined),
|
: undefined),
|
||||||
[isFirstChatFolderActive, content, handleReset, isChatOpen],
|
[isFirstChatFolderActive, content, handleReset, isChatOpen, isForumPanelOpen],
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleHotkeySearch = useCallback((e: KeyboardEvent) => {
|
const handleHotkeySearch = useCallback((e: KeyboardEvent) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user