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

Redraw chessground only on window width change #129

Merged
merged 1 commit into from
Nov 12, 2022

Conversation

seanyeh
Copy link
Contributor

@seanyeh seanyeh commented Nov 12, 2022

In some mobile browsers, scrolling a page triggers a window resize event (due to the url bar hiding), which redraws the page (resize_ground) and resets the page position to the top. I've experienced this with Chrome on Android and Firefox on Android, don't know if this affects other browsers. Since resize_ground only cares about width anyway, I think we can trigger this only on window resize when the width changes.

Please let me know if this fix is acceptable, thanks!

In some mobile browsers, scrolling will trigger a window resize event
due to the url bar hiding and thus changing the height. This commit
fixes an issue where scrolling on mobile will constantly redraw the page
and reset the page position to the top
@ArneVogel ArneVogel merged commit dc62b7a into ArneVogel:master Nov 12, 2022
@ArneVogel
Copy link
Owner

Looks good, thanks a lot 👍

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 this pull request may close these issues.

2 participants