mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	resize: Avoid hard-coding 10px for header padding.
This commit is contained in:
		@@ -2,9 +2,13 @@ const util = require("./util");
 | 
				
			|||||||
const resize_app = function () {
 | 
					const resize_app = function () {
 | 
				
			||||||
    const panels_height = $("#panels").height();
 | 
					    const panels_height = $("#panels").height();
 | 
				
			||||||
    $("body > .app").height("calc(100% - " + panels_height + "px)");
 | 
					    $("body > .app").height("calc(100% - " + panels_height + "px)");
 | 
				
			||||||
    // the floating recipient bar is usually positioned 10px below the
 | 
					
 | 
				
			||||||
    // header, so add that to the panels height to get the new `top` value.
 | 
					    // the floating recipient bar is usually positioned right below
 | 
				
			||||||
    $("#floating_recipient_bar").css("top", panels_height + $(".header").height() + 10 + "px");
 | 
					    // the `.header` element (including padding).
 | 
				
			||||||
 | 
					    const frb_top = panels_height
 | 
				
			||||||
 | 
					                    + $('.header').height()
 | 
				
			||||||
 | 
					                    + parseInt($(".header").css("paddingBottom"), 10);
 | 
				
			||||||
 | 
					    $("#floating_recipient_bar").css("top", frb_top + "px");
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
exports.resize_app = resize_app;
 | 
					exports.resize_app = resize_app;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user