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

Start game messes up coordinate mapping #35

Open
ianfab opened this issue Oct 10, 2023 · 3 comments
Open

Start game messes up coordinate mapping #35

ianfab opened this issue Oct 10, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@ianfab
Copy link
Owner

ianfab commented Oct 10, 2023

Sometimes after clicking "Start game" the coordinate identification seems to be messed up as can e.g. be seen by right clicking on the board, making it impossible to move properly. Any zooming or scrolling either before or after clicking "Start game" seems to fix it. Potentially an interference with hiding of elements on start of game?

@ianfab ianfab added the bug Something isn't working label Oct 10, 2023
@yjf2002ghty
Copy link
Contributor

I've never seen such problem in my environment. I've tested the program on:
Google Chrome 117.0.5938.134
Microsoft Edge 117.0.2045.40
Probably this is caused by the browser itself. I think a solution for this is to scroll the page to the top after hiding the elements.

window.scrollTo(0,0);

@ianfab
Copy link
Owner Author

ianfab commented Oct 10, 2023

I can reproduce this with Chrome/Chromium on Windows, Linux, and Android, as well as with Edge on Windows, so I thought it should be reproducible across most browser versions. Yeah, just forcing a scroll might be sufficient as a workaround.

@dpldgr
Copy link
Contributor

dpldgr commented Oct 12, 2023

This bug appears on my Windows 10 Pro desktop using Chrome 117.0.5938.149 and scrolling also fixes it for me. It seemed to appear after some time, so I'm not sure how you'd automatically detect that the bug has been activated and needed fixing with a scroll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants