Add Magnet dialog overflows vertically when pasting multiple magnet links

Open Beginner friendly
#338 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript
Domain
desktop, frontend

Research direction

The textarea is in src/components/modals/add.tsx around lines 406-425, configured with autosize, minRows={6} and maxRows={25}. Read how that textarea and the modal's container size themselves, then run the desktop app and paste several long magnet links to reproduce. Done when the textarea grows only up to the space left in the viewport and then scrolls internally, while the dialog itself does not scroll and the Add and Cancel buttons stay visible.

Written by the indexing model from the issue text.

Description

Description

When pasting multiple long magnet links, the textarea expands until the dialog exceeds the available screen height. This introduces a second scrollbar on the dialog itself, in addition to the textarea's scrollbar, pushing the Add/Cancel buttons out of view.

As a result, I have to scroll the entire dialog down every time I want to add a batch of magnets.

Steps to reproduce
  1. Open the "Add torrent by magnet link or URL" dialog.
  2. Paste several long magnet links, one per line.
  3. Notice how the textarea expands and the dialog becomes vertically scrollable.
Expected behavior

The textarea should expand only within the available screen space, then scroll internally as needed, keeping the other fields and Add/Cancel buttons visible without scrolling the entire dialog.

Environment
  • TrguiNG build: e4be7af
  • Windows 11
  • Display: 1920×1080, 125% scaling
  • Desktop application
Possible cause

The textarea in [src/components/modals/add.tsx](https://github.com/openscopeproject/TrguiNG/blob/e4be7af/src/components/modals/add.tsx#L406-L425) uses autosize with minRows={6} and maxRows={25}, without accounting for the available viewport height.

Screenshots

Before and after pasting multiple magnet links.

Before After
Dominant language
TypeScript
Stars
819
Forks
109
Avg merge
4h 39m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openscopeproject/TrguiNG

All issues in openscopeproject/TrguiNG

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.