From edfb7b6b24a5fea70b37c9f3085523b51f80fa9f Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 27 Jan 2025 14:04:12 +0400 Subject: [PATCH] Add delay for anim::Disabled tabbed panel hide. --- Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp b/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp index da083896f..5ff9b9ab9 100644 --- a/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp +++ b/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp @@ -292,7 +292,11 @@ void TabbedPanel::otherLeave() { if (_a_opacity.animating()) { hideByTimerOrLeave(); } else { - _hideTimer.callOnce(0); + // In case of animations disabled add some delay before hiding. + // Otherwise if emoji suggestions panel is shown in between + // (z-order wise) the emoji toggle button and tabbed panel, + // we won't be able to move cursor from the button to the panel. + _hideTimer.callOnce(anim::Disabled() ? kHideTimeoutMs : 0); } }