react-spectrum
ed49f7e6 - Fix Firefox textarea autoscroll (#3432)

Commit
3 years ago
Fix Firefox textarea autoscroll (#3432) * make Textarea always scroll to bottom on height change this fixes issue where Firefox wouldnt auto scroll as the user typed in a quiet custom height textarea. The overflow style shifts cause the scroll position to remain static once we hit the user specified height * replace scrollTop solution with selectionRange instead scrollTop solution doesnt work if the user is in the middle of the textarea and starts deleting stuff since it will cause the scroll to jump to the bottom, this feels a bit gross because of the raf * adjusting approach back to scrollTop to avoid raf * simplifying logic * fixing FF autoscroll issue with scrollbar-width instead * fix tests * fix ssr tests * Apply review suggestion Co-authored-by: Devon Govett <devongovett@gmail.com> * hack to fix Firefox autoscroll issue FF 104 introduces a bug where setting the input height directly doesnt actually change the height if overflow/scrollbar-width is reset. We decided to remove the overflow setting if we are in FF, note that this will bring the following bug back: https://github.com/adobe/react-spectrum/pull/3379#pullrequestreview-1062266152 * adding filed brower bug Co-authored-by: Devon Govett <devongovett@gmail.com> Co-authored-by: Danni <drobinson@livefyre.com>
Author
Parents
Loading