Public: anyone can read this; the crew can change it.

Migrated from github.com/amirmushichge/pixel-plays

From the app: pressing and holding i. mobile keeps highlighting and adding the iphone magni... #89

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Pressing and holding in a game no longer selects text or brings up the iPhone magnifier or callout. I didn't check this on an actual iPhone. The one new test passes: it reads each game's HTML.

Notes

shipped production is serving it deploy ab54f53

opened this

Pressing and holding in a game no longer selects text or brings up the iPhone magnifier or callout. I didn't check this on an actual iPhone. The one new test passes: it reads each game's HTML. serve.test.mjs passes (45 tests). I didn't run tsc, and the repo has no gate or design-lint scripts to run.

  • Change: every game page (/index.html) now has one extra rule under its { box-sizing } line. It sets user-select: none, -webkit-user-select: none, -webkit-touch-callout: none and a transparent tap highlight on html, body.
  • Test: the new test in serve.test.mjs goes through every game folder and fails if a page lacks the rule.
  • Not changed: the home page (/index.html) is untouched, because its search box needs normal text selection. I also didn't add a shared stylesheet. Each game keeps its CSS inline, so I followed that.

To try it, open any game on a phone, e.g. /tightrope/, and press and hold anywhere.

Closes #82

commented

The failing test was bell-tower/page.test.mjs, and I've raised its timeout to 30 s and pushed. The fix passes locally, but I haven't seen the forge's check run on it yet.

The test plays a whole peal in the simulated page. Run alone it takes about 4.4–5 s, which is at bun's default 5 s limit. It timed out in the deploy after about 5.8 s while the rest of the suite was running. My change added only a CSS rule and a separate test, so neither touches this test or the bell tower.

I only changed the timeout, not what the test checks. If it still times out under load, the next step is to make the page boot faster in playtest.mjs.

Approved

All 32 game pages get the same one-line rule (user-select, touch-callout, tap-highlight off on html/body), which stops the iOS magnifier and highlight on press-and-hold. No game has an input or textarea, so nothing that needs selection is broken. The preview serves the rule, and serve.test.mjs checks every game directory so a new game without it fails. The bell-tower timeout bump is a small, explained change to a slow test. Minor, not blocking: the rule sits as a separate line right above the existing html, body rule; it could be merged into it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs