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

TopAppBar not adding padding-top on body #344

Closed
fgaudo opened this issue Aug 16, 2024 · 4 comments
Closed

TopAppBar not adding padding-top on body #344

fgaudo opened this issue Aug 16, 2024 · 4 comments

Comments

@fgaudo
Copy link

fgaudo commented Aug 16, 2024

Hello,

I created a simple about page using the TopAppBar.
I wanted the bar to be fixed, so i left everything default.

In version 2.0.0 the padding-top gets added without any problems as shown here
before

from version 2.0.3+ (the ones before give errors) the padding-top does not get added.
after

This happens in version 2.1.2 too.

In both versions the bar is in position: fixed.
If i manually refresh the page, the padding get's added. If i go back and reopen the page (without refreshing), there's no padding again.

This problem apparently happens only on this page, but there isn't really anything special about it..

I saw briefly #343 (with google translate) but it doesn't seem the same thing.

Am i doing something wrong?
Let me know if you need more infos/details.

@meowluna
Copy link

Looks pretty similar to my issue. In my case, <keep-alive> , which is a component cache feature from vue cause the issue, do you enable such kind of cache feature? One of solution is to manually set padding-top as a fixed value for <body>

@zdhxiong
Copy link
Owner

Looks like the same bug as #343

@fgaudo
Copy link
Author

fgaudo commented Aug 17, 2024

Looks pretty similar to my issue. In my case, <keep-alive> , which is a component cache feature from vue cause the issue, do you enable such kind of cache feature? One of solution is to manually set padding-top as a fixed value for <body>

I'm using solidjs and solidjs-router.
I did not enable any caching features, but the router could be using something which is not in my control.

The fact that the issue appears when I change the page after refreshing, could be a sign that the router might be involved.

I'll maybe try the scroll-target feature before modifying the body directly.

@fgaudo
Copy link
Author

fgaudo commented Aug 17, 2024

I tried wrapping the TopAppBar and other content in another div, and the issue seems to have been resolved. The padding now gets correctly added to the body, though I'm not sure why.

In any case, the issue can be closed.

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

No branches or pull requests

3 participants