ztjhz / BetterChatGPT

An amazing UI for OpenAI's ChatGPT (Website + Windows + MacOS + Linux)
http://bettergpt.chat/
Creative Commons Zero v1.0 Universal
7.8k stars 2.63k forks source link

Fix page reflow on Firefox and Safari #562

Open ZihaoZhou opened 3 months ago

ZihaoZhou commented 3 months ago

Bug: Page reflow / shaking on textarea resizing Step to reproduce: Open BetterChatGPT with Firefox / Safari, go the end of page, type new line in the textarea. Fix: Use a hidden buffer textarea, calculate the height using it instead of setting textarea to auto everytime

zewebdev1337 commented 1 month ago

I couldn't figure out what this PR was referring to (skill issue I think) so I merged it into my fork hoping it was what I thought it was and yes, it indeed seems to be what I though.

For anyone who as me is not getting the gist from ZihaoZhou's description, this fixes the behavior where, upon editing a large chunk of text in the textarea, the line where the cursor is positioned gets displaced to the very bottom of the screen and when pressing ctrl-z, the cursor goes out of sight