Andarist / Andarist/react-textarea-autosize

Blinks in Firefox when rendered on server and then re-rendered on the client.

オープン
#275 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
2.4k
フォーク
247
PR マージ指標
30日以内にマージされた PR はありません

説明

An example:

```

```

is rendered on the server (using react server-side rendering) and then re-rendered on the client using exactly the same argument.

When it is re-rendered on the client, component recomputes the height differently than when it is done by the Firefox 76.0.1 (looks fine on Chrome), so page jumps on load.

I have made a small online demo here: https://learn-idris.net/textarea-autosize-blink

What might be the solution:
* fix some styles to make initial rendering identical to computed rendering (probably hard)
* add an option to explicitly disable computation of height on initialization; recompute height only on a change
* maybe turn on this option when both `rows` and `minRows` specified

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。