-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS textarea trick intermittently fails on iPhone #85
Comments
I used QuickTime to mirror my iPhone screen to my computer to make this demo, then used the Safari debugger to connect to that. |
It seems related to timing wrt the document state. In this video I use an incognito tab to reproduce the bug the force the screen to re-render by changing the size of the font and the bug goes away. RPReplay_Final1696178061.mp4 |
Huh, I wonder if the fix would be to set |
I think the real issue is about timing. In the video I change the font size up and then rest it back down. I might be as simple as running the JavaScript code a little later, such as on document load. |
Doing an initial jiggle to emulate what @ImJohnDoe did, might work. This might also be a CSS grid row-height reflowing bug. |
BTW, to apply the principle of Progressive Enhancement to this, one might consider applying a reasonable default height to the textatea, and then only set its height to single-row (and remove its resizability and scrollbars) when/if the parent has the |
https://til.simonwillison.net/css/resizing-textarea
Sometimes it works, sometimes it doesn't. I've found it easiest to recreate clicking a link to it in the Twitter in-app browser.
I managed to run the Safari debugger against it, where I confirmed that the
data-
attribute is correctly updating - I can't figure out why that doesn't cause the::after
element to increase in size:CleanShot.2023-10-01.at.07.31.26.mp4
The text was updated successfully, but these errors were encountered: