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]);
|
||||
|
||||
useEffect(
|
||||
() => (content !== LeftColumnContent.ChatList || (isFirstChatFolderActive && !isChatOpen)
|
||||
() => (content !== LeftColumnContent.ChatList || (isFirstChatFolderActive && !isChatOpen && !isForumPanelOpen)
|
||||
? captureEscKeyListener(() => handleReset())
|
||||
: undefined),
|
||||
[isFirstChatFolderActive, content, handleReset, isChatOpen],
|
||||
[isFirstChatFolderActive, content, handleReset, isChatOpen, isForumPanelOpen],
|
||||
);
|
||||
|
||||
const handleHotkeySearch = useCallback((e: KeyboardEvent) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user