New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resize event not triggered after expand treemenu #1547
Comments
@Th3M3 thanks for the raising the issue! From my tests so far, this seems to be caused by the change in header height during the transition between the stacked header and the normal header. Trying to figure out a solution right now. Let me know if you find something that could be helpful. Thanks! |
@Th3M3 we just submitted a fix on the master. Would you care to test it? Thanks! |
I have updated files Here a screenshot (using Opera on Windows) with Developer Tools open and At another test in Microsoft Edge, the gap between footer and bottom is even more. After zoom the page to 110%, the pages work correctly on Microsoft Edge. The next days I will try to change the js to log the heights variables into Developer Tool's console, to find out what is going on there in detail.... |
So the issue only occurs on Opera? |
Edit: Maybe jQuery needs to be updated too to get the footers I will try this out and will report here. |
I tested on Opera, Safari, FF and Chrome but I could not reproduce on the demo. If you test your browser using the Demo it would be great! |
At 100% zoom, the gap is still there like you see on my screenshot, on Opera and Microsoft Edge. Haven't tested other browsers. |
Are you sure to have updated the files in the demo? |
Sorry I meant testing by downloading the master branch. |
Now I had time to test it again. But it still not work as expected: But if I Same behavior on Opera and Microsoft Edge. Edit: Sorry - mistaken collapse and expand |
The following things I found out:
Here my suggestion to the code. My changed lines are marked with a red // Get window height and the wrapper height
var footerHeight = $(Selector.mainFooter).outerHeight() || 0
var neg = $(Selector.mainHeader).outerHeight() + footerHeight
var windowHeight = $(window).height()
> var sidebarHeight = $(Selector.sidebar).outerHeight() || 0
> var headerHeight = $(Selector.mainHeader).outerHeight() || 0
// Set the min-height of the content and sidebar based on
// the height of the document.
if ($('body').hasClass(ClassName.fixed)) {
$(Selector.contentWrapper).css('min-height', windowHeight - footerHeight)
} else {
var postSetHeight
> if (windowHeight >= sidebarHeight + headerHeight) {
> $(Selector.contentWrapper).css('min-height', windowHeight - Math.ceil(neg))
> postSetHeight = windowHeight - Math.ceil(neg)
} else {
> $(Selector.contentWrapper).css('min-height', sidebarHeight - footerHeight)
> postSetHeight = sidebarHeight - footerHeight
}
// Fix for the control sidebar height
var $controlSidebar = $(Selector.controlSidebar)
> setTimeout(function(){
if (typeof $controlSidebar !== 'undefined') {
if ($controlSidebar.height() > postSetHeight)
$(Selector.contentWrapper).css('min-height', $controlSidebar.height())
}
> }, 0);
}
} Please review/test out my code. For me it works fine. |
Hi Th3M3, your solution on editing the codes in adminlte.js works properly. You should try contributing this changes. By the way, I'm still using the default Jquery provided in the |
@jaydenseah Thank you for your testing and feedback. I have created a pull request for my changes. Regarding my jquery issue, I did not notice that there is a |
@Th3M3 you're most welcome. Regarding the |
I try to update v2.1.2 to actual v2.4.
But when I update old
app.min.js
to newadminlte.min.js
, I get the following issue:If I use a content page that is smaller then the browser' height and expand one of the treeview-menus on the left sidebar, the footer should move down to always stay on page's bottom.
This was workig in the older versions, but does not in v2.4
I also tried to reproduce it with the demo page:
With the browser's developert tools, I removed some of the content, did a browser resize and swithed back to fullscreen, and than expanded one of the treemenu.
This is what I get before expand e.g. the Charts-Menu (everything is as axpected):
And after expand Charts:
The Footer is not aligned to bottom and there are two scrollbars on the right.
It goes to normal if I collapse the menu or do a screen resize - but the resize event sould get triggered automatically.
The text was updated successfully, but these errors were encountered: