mirror of https://github.com/zulip/zulip.git
Fix responsive layout on Subscriptions and Settings page.
This was a really cute bug where our layout messes up if you resize the page while "Subscriptions" (or to a less visible extent, "Settings") is active. The problem here is that we compute the size of the top navbar based on the size of main_div -- but when main_div is hidden, it has a width of zero! We need to instead look at the width of the pane that *is* active. Resolves https://trac.humbughq.com/ticket/216 (imported from commit adbef00d190845f90c5cfdb46df4ec7b703635ef)
This commit is contained in:
parent
7e4776322d
commit
f3ba899fe1
|
@ -112,10 +112,15 @@ function resizehandler(e) {
|
||||||
|
|
||||||
top_statusbar.css('top', space_taken_up_by_navbar);
|
top_statusbar.css('top', space_taken_up_by_navbar);
|
||||||
|
|
||||||
var message_list_width = $("#main_div").outerWidth();
|
var desired_width;
|
||||||
composebox.width(message_list_width);
|
if (exports.home_tab_obscured() === 'other_tab') {
|
||||||
top_statusbar.width(message_list_width);
|
desired_width = $("div.tab-pane.active").outerWidth();
|
||||||
sidebar_nav.width(message_list_width);
|
} else {
|
||||||
|
desired_width = $("#main_div").outerWidth();
|
||||||
|
composebox.width(desired_width);
|
||||||
|
}
|
||||||
|
top_statusbar.width(desired_width);
|
||||||
|
sidebar_nav.width(desired_width);
|
||||||
} else {
|
} else {
|
||||||
sidebar.addClass('nav-stacked');
|
sidebar.addClass('nav-stacked');
|
||||||
top_statusbar.css('top', 0);
|
top_statusbar.css('top', 0);
|
||||||
|
|
Loading…
Reference in New Issue