Closed JohnHKoh closed 3 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/downforacross/downforacross.com/8BEicvaAXEUUDV56GQ5YNXv7q1Cg
✅ Preview: https://downforacrossc-git-fork-johnhkoh-johnhkoh-fix-mobile-key-046229.vercel.app
On mobile, after refreshing the page or re-opening the keyboard, the first key entered would show a "$" no matter what key was pressed. This was due to the value being set to {char}$ instead of the expected ${char}, I guess due to the behavior where clicking on a textarea makes your cursor insert at the start. This changes
onfocus
to set the cursor to the end of the textarea value. See stackoverflow answer here: https://stackoverflow.com/a/10576409/4157513 (the "quirk" they mention doesn't seem to apply anymore to my version of Chrome).Also updated autoComplete and autoCapitalize attributes for better keyboard behavior on mobile.