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
{{ message }}
Repository navigation
Finish text entry when clicking outside a text box #60
In Folio 1.15.1 on macOS, after adding text to a PDF, clicking outside the text box leaves the Text tool armed. Further page clicks can create unintended text boxes while the user is trying to finish editing.
Expected behavior
Clicking outside an actively edited text box should commit its contents (or remove an empty box) and return to Select. Adding another text box should require choosing Text again. Clicking inside the editor or using its formatting controls should continue editing. Explicitly choosing another tool should still work.
Proposed scope
A small integration change around the existing pdf.js editing lifecycle, with regression coverage for click-away, empty boxes, formatting, switching tools, undo, and reopening saved text. This changes tool behavior, so please confirm whether this scope fits Folio before an upstream PR is marked ready.
Related signature workflow work in #44 is separate. No private forms or signatures are included in this report.
A focused implementation is available on this branch. It uses the existing pdf.js commit/remove lifecycle, returns to Select on click-away, and preserves intentional re-entry into Text and formatting controls.
The regression fails on the original code and passes with the fix. The integrated macOS build passes TypeScript, the production build, and the full off-screen smoke suite, including empty-box removal, formatting, undo/redo and reopening saved text. Cross-platform CI has not run: GitHub disables inherited workflows on new forks. Before/after screenshots were captured using the synthetic sample document; the browser upload was unsuccessful, so no images are attached yet.
Maintainer agreement on this behavior is requested before opening an upstream PR, per CONTRIBUTING.md.
Approved. When someone clicks outside an active text box, finish the edit and return to Select. Keep any text they entered and discard an empty box. Clicking inside the box or using its formatting controls should let them keep editing. If they explicitly choose another tool, honor that choice.
Please rebase your branch onto the current main and open a PR targeting main so Folio's CI can run on Windows, macOS, and Linux. Please include your click-away, undo, and reopen tests in the PR.
Activity
apexEvan commentedon Nov 4, 2026
A focused implementation is available on this branch. It uses the existing pdf.js commit/remove lifecycle, returns to Select on click-away, and preserves intentional re-entry into Text and formatting controls.
The regression fails on the original code and passes with the fix. The integrated macOS build passes TypeScript, the production build, and the full off-screen smoke suite, including empty-box removal, formatting, undo/redo and reopening saved text. Cross-platform CI has not run: GitHub disables inherited workflows on new forks. Before/after screenshots were captured using the synthetic sample document; the browser upload was unsuccessful, so no images are attached yet.
Maintainer agreement on this behavior is requested before opening an upstream PR, per CONTRIBUTING.md.
mberman84 commentedon Nov 5, 2026
Approved. When someone clicks outside an active text box, finish the edit and return to Select. Keep any text they entered and discard an empty box. Clicking inside the box or using its formatting controls should let them keep editing. If they explicitly choose another tool, honor that choice.
Please rebase your branch onto the current
mainand open a PR targetingmainso Folio's CI can run on Windows, macOS, and Linux. Please include your click-away, undo, and reopen tests in the PR.