max / balanced_breakfast
- Co-Authored-By
- Claude Opus 5 (1M context) <noreply@anthropic.com>
1 file changed,
+10 insertions,
-1 deletion
| @@ -9,7 +9,16 @@ | |||
| 9 | 9 | ||
| 10 | 10 | // Touch Detection | |
| 11 | 11 | ||
| 12 | - | const isTouchDevice = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0); | |
| 12 | + | // The density question, asked the way geometry.css asks it. This was a | |
| 13 | + | // capability sniff off the window and the navigator until 2026-08-10: it | |
| 14 | + | // asked what hardware exists rather than what is pointing at the screen, | |
| 15 | + | // so a laptop with a touchscreen and a mouse came back touch and lost its | |
| 16 | + | // hover affordances. The string is makeover_geometry::Density::Touch's own | |
| 17 | + | // media condition. Unlike goingson, nothing here fails the build if it | |
| 18 | + | // drifts -- BB's build.rs has no check pass yet. | |
| 19 | + | const TOUCH_DENSITY = '(hover: none), (pointer: coarse)'; | |
| 20 | + | ||
| 21 | + | const isTouchDevice = window.matchMedia(TOUCH_DENSITY).matches; | |
| 13 | 22 | ||
| 14 | 23 | // Long Press | |
| 15 | 24 |