Free text stays scrolled to the caret after editing ends
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start in packages/framework/react/src/annotation.tsx at FreeText, where the issue says scrollTop is reset when editing begins. Trace how the box is rendered after editing ends while its source is vector, then reset its scroll so the first line is visible. Done when text that overflowed during editing starts at its first line after clicking away; the payload names no test, so inspect nearby tests for coverage.
Written by the indexing model from the issue text.
Description
Version: 3.0.0-next.14, @embedpdf/react.
What happens: Type into a free-text box until the text runs past the bottom of the box. The browser scrolls the box to follow the caret. Click away to end editing: the box still shows the last lines, scrolled to where the caret was, instead of the text from its first line.
Expected: Once editing ends, the box shows its text from the first line, clipped at the bottom, the way the baked appearance does.
Cause: FreeText in packages/framework/react/src/annotation.tsx resets scrollTop to 0 only when editing begins. After a text edit the box is drawn live (its source is vector), so the element stays mounted with the scroll the browser applied.
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 317
- Avg merge
- 10h 16m
- Merged PRs (30d)
- 174
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from embedpdf/embed-pdf-viewer
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
embedpdf/embed-pdf-viewer#1098 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
embedpdf/embed-pdf-viewer#921 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
embedpdf/embed-pdf-viewer#889 ·
Maintainers usually reply within 1 day
-
[v2] TaskQueue: equal-priority tasks can run out of order when a randomUUID id starts with digitsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
embedpdf/embed-pdf-viewer#874 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
embedpdf/embed-pdf-viewer#816 ·
Maintainers usually reply within 1 day
All issues in embedpdf/embed-pdf-viewer
Similar issues
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
lingdojo/kana-dojo#34223 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
bug status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mastra-ai/mastra#30587 · 1 comment ·
Maintainers usually reply within 1 day
-
area:web p2 product:business triage:active type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
cuadrao-ai/argus#2228 ·
Maintainers usually reply within 1 day
-
.Needs Triage .Team/Metabot Priority:P3 Type:Bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
metabase/metabase#87252 · 1 comment ·
Maintainers usually reply within 1 day
-
NuGet registry builds every URL from ROOT_URL, ignoring the host the client usedPossibly taken @gritse claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day