Skip to content
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

Problem with page refresh #74

Open
visavi opened this issue Jan 17, 2020 · 5 comments
Open

Problem with page refresh #74

visavi opened this issue Jan 17, 2020 · 5 comments
Labels

Comments

@visavi
Copy link

visavi commented Jan 17, 2020

If you refresh the page from anywhere F5 or ctrl+R, it always flips up, is there any way to fix this?
Chrome and firefox desktop

@marxjmoura
Copy link
Owner

You are right. These browsers remember the scroll position of the <body> tag. Admin4B hide the overflow content of body tag and uses .app .app-content .content-body as the body, which is causing this user experience.

@marxjmoura
Copy link
Owner

Could you try this for now?

window.onbeforeunload = function () {
  localStorage.setItem('scrollTop', $('.content-body').scrollTop());
};

$('.content-body').scrollTop(localStorage.scrollTop || 0);

@visavi
Copy link
Author

visavi commented Jan 17, 2020

yes it works, it's just that it’s bad on js

problem
html, body {
height: 100%;
width: 100%}

if you remove the height, then everything is fine, but the left panel does not work

@marxjmoura
Copy link
Owner

I know, it is not the better solution. :/

Maybe the real solution involves changing the CSS hierarchy. I will work on this in the next couple of weeks.

@marxjmoura marxjmoura added the fix label Jan 19, 2020
@visavi
Copy link
Author

visavi commented Jan 20, 2020

Thank you, I will wait for changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants