You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure TextEdit cursor is never out of bounds (upstreamed at: emilk#7077)
When rendering a TextArea we don't know if the saved cursor applies to
the current galley since it's possible the app changed the TextBuffer
(e.g. when submitting a chat input)
So we now detect if the galley changed from the last known one and clamp
the cursor to ensure it's not out of bounds.
This fixes an issue where backspace can suddenly stop working
Repro:
- Render TextArea with long-ish text (say 20 chars)
- Without losing focus, clear the text
- Write something short (say 5 chars)
- Result: backspace doesn't work because the cursor position is wrong
0 commit comments