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

Bug on Safari Mobile, when switching the address bar up #155

Open
CodeXiD opened this issue Feb 6, 2024 · 2 comments
Open

Bug on Safari Mobile, when switching the address bar up #155

CodeXiD opened this issue Feb 6, 2024 · 2 comments

Comments

@CodeXiD
Copy link

CodeXiD commented Feb 6, 2024

When switching the address bar up on Safari Mobile there is a problem with recalculating the location of elements, visually they are in the right place, but when clicked they don't work (because they are actually displayed in a different place when viewing the debug)

bug-image

The screenshot shows that the "Collapse" button is lower than the blue block (the blue block is where the "Collapse" button is located according to dev-tools).

I tried to figure out the problem, I don't know for sure but I think the problem is safe-area-inset-top which is used to calculate the height (height: calc(100% - env(safe-area-inset-top) - 34px);)

Maybe it is adapted to the address bar at the bottom of the screen, I don't understand this topic enough, so if you can suggest, help or fix this behavior I would appreciate it.

By the way, not only the "Collapse" button behaves like this, but all elements inside the popup as well.

And also, this behavior is not reproducible on simulators, only on real devices.

@jadus
Copy link

jadus commented Aug 22, 2024

Hi @CodeXiD , same issue here.
Did you find an answer ?

@khashashin
Copy link

I am experiencing the same issue on Chrome for Android. The header's position appears to be offset, likely due to an incorrect Y-axis transition calculation.

The Y-axis transition appears to be calculated incorrectly, causing the header to be displayed in the wrong position, see the screenshot:

image

After inspecting the behavior, it seems that manually setting the Y position to 0 resolves the issue and correctly aligns the header.

image

When the Y-axis transition is adjusted to 0, the header position is fixed as expected.

image

It seems the calculation for the Y-axis transition doesn’t account for certain conditions. This miscalculation shifts the header position.

Let me know if additional information is needed or if I can help test further fixes!

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