Files
pdfcraft/contributors
9f2188bf7e Issue #166: Save, Print and Export include the text still being typed in a form field (#278)
* Issue #166: Save, Print and Export include the text still being typed in a form field

A field's editor kept its text in a draft until Enter, Tab or clicking away,
and ⌘S (which runs while a field has focus) saved the document first. Typing
also didn't count as unsaved, so closing or quitting didn't ask.

- commit_form_typing(): apply the tab's queued edit, then commit the open
  field's draft; if the field refuses the value, keep the editor and text
  and stop. Called where the document is read: Save, Save As (and its later
  callback), Print, Export, Reduce/Optimize, Sign, Extract, Split, Copy
  pages, Flatten, button scripts.
- Uncommitted typing counts as unsaved work for Close, Close All and Quit;
  saving from the prompt brings that tab forward first.
- Shortcuts pressed while a form field's editor is open run one frame later,
  for that document only, so the field takes the frame's typing and Escape.
- A value refused on Enter/Tab/blur reopens the field with the text.
- Notices show in full screen too.

Co-authored-by: Hal Goff <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Add my contributor name (AutoHenry)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Brandon Thomas <[email protected]>
2026-10-08 10:02:18 -04:00
..