Pasting long text in the summary or description makes scrolling possible
The problem
Pasting long text into the summary of a commit will make scrolling horizontally possible. Pasting long text into the description of a commit will make scrolling vertically possible (not to scroll through the text, but the sidebar wholly).
I have attached a video in the additional context, but this should be fairly simple to understand.
Release version
3.2.4-beta1 (arm64)
Operating system
macOS Ventura 13.4
Steps to reproduce the behavior
- Copy text that is considered long
- Paste it in a commit summary or commit description
Log files
No response
Screenshots
No response
Additional context
https://github.com/desktop/desktop/assets/33201955/4921590a-6f07-4575-91a0-f3af96318607
Try to use binary forms, to convert you txt, and use for you programmings.
The root cause of this issue seems to be that the updateCaretCoordinates method returns an out-of-bounds position for the invisible caret:
https://github.com/desktop/desktop/blob/57180aa893759ffe0fef9bcaa4048cf7a02b9fcc/app/src/ui/autocompletion/autocompleting-text-input.tsx#L446-L452
In other words, the invisible caret position should never exceed the width of the element, since the system's selection caret can be scrolled off-screen.
Fixed by https://github.com/desktop/desktop/pull/17472