fix control-sidebar height with layout-fixed (#2927)

pull/2928/head
REJack 2020-07-25 00:39:07 +02:00 committed by GitHub
parent 8facf9fa18
commit 45a51f51b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -99,6 +99,9 @@ class ControlSidebar {
$body.addClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN) $body.addClass(CLASS_NAME_CONTROL_SIDEBAR_OPEN)
} }
this._fixHeight()
this._fixScrollHeight()
$(this._element).trigger($.Event(EVENT_EXPANDED)) $(this._element).trigger($.Event(EVENT_EXPANDED))
} }
@ -183,7 +186,8 @@ class ControlSidebar {
$controlsidebarContent.css('height', heights.window - (heights.header + heights.footer)) $controlsidebarContent.css('height', heights.window - (heights.header + heights.footer))
} else if (positions.bottom <= heights.footer) { } else if (positions.bottom <= heights.footer) {
if (footerFixed === false) { 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)) $controlsidebarContent.css('height', heights.window - (heights.footer - positions.bottom))
} else { } else {
$controlSidebar.css('bottom', heights.footer) $controlSidebar.css('bottom', heights.footer)