Infinite-Chess / infinitechess.org

Infinite Chess Web Server
https://www.infinitechess.org
GNU Affero General Public License v3.0
193 stars 45 forks source link

Bug- AFK timer not resetting on mobile #231

Open Naviary2 opened 3 months ago

Naviary2 commented 3 months ago

On mobile, if you go afk long enough, when it's your turn, for the 20s afk-auto-resign timer to kick in, then sometimes if you quick-tap the pieces to move them, being careful to NOT drag the board at all, you can make your move without resetting that timer, and end up losing by disconnection even though it's not your turn anymore.

Lead: Perhaps touch-start events don't reset the timer client-side, but only touch-move events? I could see a rapid tap firing the start event but not the move one. Look inside input.js

Naviary2 commented 3 months ago

You can replicate this on desktop as well by clicking your pieces without moving the mouse a single pixel, the act of clicking/tapping doesn't reset the timer the same as movement does.