mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
condense: Re-condense all messages on window resize.
Previously, if you started out with a very small window, loaded the Zulip webapp, and then resized the window to be larger, you'd get the condensed "[More]" links on essentially every message. This failure mode was most visible with multi-protocol Electron apps like Rambox that would sloppily start with a tiny window and then resize it when loading Zulip. The Rambox experience was essential to our being able to track this down; once we knew what was happening, the fix was simply to re-compute the condense state on resize. Commit message rewritten by tabbott to explain the debugging and context involved here, since this was one of our longest-lived mystery bugs. Fixes #5312.
This commit is contained in:
committed by
Tim Abbott
parent
3b29d00c69
commit
97b90c1e87
@@ -277,6 +277,9 @@ exports.handler = function () {
|
||||
popovers.hide_all();
|
||||
exports.resize_page_components();
|
||||
|
||||
// Re-compute and display/remove [More] links to messages
|
||||
condense.condense_and_collapse($("div.message_row"));
|
||||
|
||||
// This function might run onReady (if we're in a narrow window),
|
||||
// but before we've loaded in the messages; in that case, don't
|
||||
// try to scroll to one.
|
||||
|
||||
Reference in New Issue
Block a user