The Long Press That Turns Your HUD Into Selected Text
A player in my group sent a screenshot instead of a message: his score panel had a blue selection band running across it and the browser's copy toolbar was sitting over the bottom of the game. He had not long-pressed any
A player in my group sent a screenshot instead of a message: his score panel had a blue selection band running across it and the browser's copy toolbar was sitting over the bottom of the game. He had not long-pressed anything on purpose. He had rested his thumb on the screen for a second while reading a notification, and Android answered with the text selection UI.
That is the part people miss. On Android a finger that stops moving for roughly half a second stops being a pointer and becomes a candidate for the text and image layer. For a page that is one big canvas, the browser goes looking through whatever DOM sits on top of it, and HUD labels, timers and chat lines are all fair game. Two entries I keep bookmarked, vt38 and tt789, draw their score strip inside the canvas rather than above it, which is the blunt way to stay out of reach.
The damage is worse than a cosmetic highlight. A long press that opens a dialog cancels the touch sequence, so the game never receives the pointerup that would have released the button. The character keeps walking, the aim keeps drifting, and the finger that caused it is no longer touching the screen. I watched a build listed as dna777 apk do this on roughly every third hold, because its hidden status label was invisible but still selectable.
The fix is a few declarations on the game wrapper: user-select none, touch-callout none, and a contextmenu handler that returns false. Then hold a thumb on each HUD corner for a full second in biwin apk and again in rr999 apk, and watch the console for pointercancel. If the events stop mid-sequence, the page is still handing your finger to the wrong layer.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.