Andarist / Andarist/react-textarea-autosize

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

Đang mở
#275 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
2.4k
Fork
247
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.