Merge pull request #19653 from ping-yee/18077-body-padding

Fixes #18077- update body padding dynamically using MutationObserver
This commit is contained in:
Maurício Meneghini Fauth 2025-06-19 12:52:05 -03:00 committed by GitHub
commit 6e86f2ee36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1097,6 +1097,17 @@ Navigation.ResizeHandler = function () {
$('#floating_menubar').outerHeight(true)
);
}, 2);
if (window.MutationObserver) {
var target = document.getElementById('floating_menubar');
if (target) {
var observer = new MutationObserver(function () {
$('body').css('padding-top', $('#floating_menubar').outerHeight(true));
});
observer.observe(target, { attributes: true, childList: true, subtree: true });
}
}
$('#pma_console')
.css('margin-' + this.left, (pos + resizerWidth) + 'px');
$resizer.css(this.left, pos + 'px');