diff --git a/static/js/ui.js b/static/js/ui.js index 67dc340809..34b48d35a6 100644 --- a/static/js/ui.js +++ b/static/js/ui.js @@ -419,8 +419,11 @@ function left_userlist_get_new_heights() { var invite_user_link_height = $("#invite-user-link").outerHeight(true) || 0; var share_the_love_height = $("#share-the-love").is(":visible") ? $("#share-the-love").outerHeight(true) : 0; - var stream_filters_real_height = $("#stream_filters").prop("scrollHeight"); - var user_list_real_height = $("#user_presences").prop("scrollHeight"); + var stream_filters = $('#stream_filters').expectOne(); + var user_presences = $('#user_presences').expectOne(); + + var stream_filters_real_height = stream_filters.prop("scrollHeight"); + var user_list_real_height = user_presences.prop("scrollHeight"); res.bottom_whitespace_height = viewport_height * 0.4; @@ -435,9 +438,9 @@ function left_userlist_get_new_heights() { - $("#global_filters").outerHeight(true) - $("#streams_header").outerHeight(true) - $("#userlist-header").outerHeight(true) - - parseInt($("#stream_filters").css("marginBottom"),10) - - parseInt($("#user_presences").css("marginTop"), 10) - - parseInt($("#user_presences").css("marginBottom"), 10) + - parseInt(stream_filters.css("marginBottom"),10) + - parseInt(user_presences.css("marginTop"), 10) + - parseInt(user_presences.css("marginBottom"), 10) - invite_user_link_height - share_the_love_height - 15;