mirror of
https://github.com/zulip/zulip.git
synced 2025-10-27 10:03:56 +00:00
resize: Don’t hide popovers on mobile resize.
Or on the scroll triggered by that resize. Then we don’t need a kludge that skips the resize handler in situations where it might hide popovers. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
committed by
Tim Abbott
parent
87f7a578e6
commit
bd50c6a152
@@ -260,7 +260,13 @@ exports.handler = function () {
|
||||
condense.clear_message_content_height_cache();
|
||||
}
|
||||
|
||||
popovers.hide_all();
|
||||
// On mobile web, we want to avoid hiding a popover here,
|
||||
// especially if this resize was triggered by a virtual keyboard
|
||||
// popping up when the user opened that very popover.
|
||||
var mobile = util.is_mobile();
|
||||
if (!mobile) {
|
||||
popovers.hide_all();
|
||||
}
|
||||
exports.resize_page_components();
|
||||
|
||||
// Re-compute and display/remove [More] links to messages
|
||||
@@ -270,6 +276,10 @@ exports.handler = function () {
|
||||
// but before we've loaded in the messages; in that case, don't
|
||||
// try to scroll to one.
|
||||
if (current_msg_list.selected_id() !== -1) {
|
||||
if (mobile) {
|
||||
popovers.set_suppress_scroll_hide();
|
||||
}
|
||||
|
||||
navigate.scroll_to_selected();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user