From 45a51f51b2fe3cf93952e8a7c3d1886804e599b3 Mon Sep 17 00:00:00 2001 From: REJack Date: Sat, 25 Jul 2020 00:39:07 +0200 Subject: [PATCH] fix control-sidebar height with layout-fixed (#2927) --- build/js/ControlSidebar.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/js/ControlSidebar.js b/build/js/ControlSidebar.js index 1130f4b87..5141e1180 100644 --- a/build/js/ControlSidebar.js +++ b/build/js/ControlSidebar.js @@ -99,6 +99,9 @@ class ControlSidebar { $body.addClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN) } + this._fixHeight() + this._fixScrollHeight() + $(this._element).trigger($.Event(EVENT_EXPANDED)) } @@ -183,7 +186,8 @@ class ControlSidebar { $controlsidebarContent.css('height', heights.window - (heights.header + heights.footer)) } else if (positions.bottom <= heights.footer) { if (footerFixed === false) { - $controlSidebar.css('bottom', heights.footer - positions.bottom) + const top = heights.header - positions.top + $controlSidebar.css('bottom', heights.footer - positions.bottom).css('top', top >= 0 ? top : 0) $controlsidebarContent.css('height', heights.window - (heights.footer - positions.bottom)) } else { $controlSidebar.css('bottom', heights.footer)