This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
Regression: textarea ‘jumps’ after initial load #95
Labels
Comments
@FrancescoCioria confirmed it changed behaviour, I think passing a prop could make everyone happy. How about an |
sounds good 👍 I would still force it to be async when |
renchap
added a commit
to renchap/react-autosize-textarea
that referenced
this issue
Jun 16, 2018
Adds a new `async` prop to force async initialization, as proposed in buildo#95. Async initialization will make your page "jump" when the component appears, as it will first be rendered with the normal size, then resized to content. But async init is only needed when using StyledComponents (see buildo#71) or when `maxRows` is set, so let the user decide to enable it. Fixes buildo#95
I sent a PR fixing this: #103 |
renchap
added a commit
to renchap/react-autosize-textarea
that referenced
this issue
Jun 16, 2018
Adds a new `async` prop to force async initialization, as proposed in buildo#95. Async initialization will make your page "jump" when the component appears, as it will first be rendered with the normal size, then resized to content. But async init is only needed when using StyledComponents (see buildo#71) or when `maxRows` is set, so let the user decide to enable it. Fixes buildo#95
I published the fixed in the new major |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I just upgraded from
0.4.9
to3.0.2
and noticed a change in behavior. Now, when the page loads, the textarea will noticeably ‘jump’ to the correct height, pushing everything below it down the page. Before, the textarea was the correct height on initial load, so there was no jump.Here's a gif with the CPU throttled in dev tools to try and emphasize the issue for the purpose of recording. The first tab is the latest version (3.0.2) and the second tab is the old version. If you download the gif and look at frame 70, you can see the moment where the title is loaded at the wrong height before jumping to the correct height in the next frame.
Here's the relevant code (simplified to reproduction case):
The text was updated successfully, but these errors were encountered: