(If it’s not OK to ask this here @marijn please let me know and I’ll delete this thread)
contenteditable element grows past the height of the window, browsers strive to keep the caret very close to the bottom of the window. This is annoying from a UX perspective in longer documents because users end up always spending their time at the very bottom of the window.
To solve this, I’m trying to find a way so that the caret never reaches the very bottom of the window.
This is how Google Docs does it:
And this is Medium:
Has anyone found an elegant way to solve this?
I’ve tried with CSS margins and paddings but it doesn’t work. I imagine I can hack my way by manipulating the scroll position but I’d rather avoid that if possible.