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

Switching screen orientation on mobile resets contents of page #101

Closed
MysticalApple opened this issue Jul 15, 2022 · 5 comments · Fixed by #96
Closed

Switching screen orientation on mobile resets contents of page #101

MysticalApple opened this issue Jul 15, 2022 · 5 comments · Fixed by #96

Comments

@MysticalApple
Copy link
Contributor

Happens on iPhone 12 running iOS 15.5, unsure about other devices/OS

@MysticalApple
Copy link
Contributor Author

MysticalApple commented Jul 15, 2022

Might be related to Issue #35

@ky28059
Copy link
Member

ky28059 commented Jul 17, 2022

By contents of page, do you mean that it switches the tab? Or do you mean that the tab stays the same, but the physical page contents (eg. inputs, toggles) become reset?

Also, is this happening on /clubs or /utilities / /settings? Clubs uses state-based tabs where refreshing the page switches the tab back to default as the active tab is merely stored in memory, but utilities and settings use nav-tabs where the tab is linked to the current path and refreshing the page should preserve the active tab.

@ky28059
Copy link
Member

ky28059 commented Jul 17, 2022

I failed to reproduce this on my iPhone 8 (iOS 15.5) so could you attach images or a video of the problem?

@MysticalApple
Copy link
Contributor Author

Strangely enough this only seems occurs when going from horizontal to portrait when added to home screen, and has the same behavior as refreshing the page. On home screen the date is reset, in clubs the tab is reset, in utilities the tab remains the same but all input fields are wiped and the map closes, etc.

@ky28059
Copy link
Member

ky28059 commented Jul 18, 2022

image

I suspect this is related to the iPhone 12 screen, when viewed horizontally, being wide enough to exceed the breakpoint for a medium-sized screen and cause a full layout rerender. Going from a medium to phone screen width in inspect element does cause the behavior you describe.

Funnily enough, the "rerendering the whole app" issue was fixed in #96 (at least according to web emulator, you can test on preview URL) when layout was reworked to not return different <div>s depending on screen size. I think the only thing left to do is to make the sidebar rendered when viewing in horizontal actually function on such a short screen height.

@ky28059 ky28059 linked a pull request Jul 18, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants