-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
Initial height is incorrect in Firefox #366
Comments
me too |
I can't afford to investigate this on my own - unless that work would get sponsored. I'm always happy to review PRs though so if you manage to fix it you can count on me to review your work. |
Fair enough! I'll test once the other fix is on npm. |
@Andarist I believe I may have found the cause of this, or at least the cause of a similar issue that I was experiencing. In my case I solved this by adding I created #371 with this change. User agent where I experienced this: |
The issue seems to be fixed by: Andarist/react-textarea-autosize#353 See this issue: Andarist/react-textarea-autosize#366
I have tried your solution and it works! Thank you! |
I'm working on migrating to this package from
react-textarea-autosize
(because it isn't maintained anymore and doesn't support React 18) in a large project (WordPress/gutenberg#48215)I've come across a bug where the initial height is sometimes calculated incorrectly. This bug only happens in Firefox, not Chrome or Safari.
We have a large editor which has a WYSIWYG mode, and a plain-text/HTML mode. Typically, you edit in the visual editor, but may need to switch to the "code" editor for some things. This code editor uses the autosize textarea. I've found that if the editor uses the autosize textarea on first page load, it is the correct size. However, if we switch to the textarea after the first page load, it doesn't calculate the height properly (and just uses min rows/min height).
After interacting with the textarea, or even resizing the page, it adjusts to the correct size.
Untitled.mp4
The text was updated successfully, but these errors were encountered: