Measuring scrollHeight on the live textarea with an explicit height set can only grow — it can never report a shorter content height. The old `height: auto` toggle flickered across browsers. Use a hidden off-DOM textarea that mirrors the composer's text-metric styles and width, and read its scrollHeight on value/resize changes. Gated by Metro file extension (.web / .native) so it's trivial to rip out later.
2 lines
49 B
TypeScript
2 lines
49 B
TypeScript
export * from "./composer-height-mirror.native";
|