mirror of
https://github.com/zulip/zulip.git
synced 2025-10-26 09:34:02 +00:00
Before this change, we'd try to close the sidebar before closing text fields. This means if the user sidebar was open with a text search in progress, pressing Escape would close the full sidebar instead of closing search. This change deprioritizes closing the sidebar, in favor of closing input fields like search. This also helps with #26717, because the sidebar seems to be marked as open even when it's not an overlay, which means pressing Escape will first "close" it (no visual changes), before a second Escape would trigger closing the search field. Ideally we differentiate between situations where we are showing the sidebar as an overlay and when we aren't, but that might be a more involved change.