desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Pasting long text in the summary or description makes scrolling possible

Open Jiralite opened this issue 2 years ago • 1 comments

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

  1. Copy text that is considered long
  2. 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

Jiralite avatar Jun 10 '23 01:06 Jiralite

Try to use binary forms, to convert you txt, and use for you programmings.

Lds911 avatar Jun 22 '23 15:06 Lds911

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.

haykam821 avatar Oct 07 '23 22:10 haykam821

Fixed by https://github.com/desktop/desktop/pull/17472

tidy-dev avatar Oct 08 '23 23:10 tidy-dev