mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-03 06:51:50 -06:00
Ctrl+Z is left to a focused text field, so in the paragraph editor it went to the box's own Undo history. That history still held the paragraph's text from before the last formatting change, so Ctrl+Z put it back into a box laid out for the page after the change, a layout the page never had, and the document kept the change. The box shared its id across paragraphs too, so it could put back another paragraph's text. The history of the paragraph editor and the added-text box now starts at what the page has. Undo and Redo keep the keys only while the box holds typing the page doesn't have; then they reach the document. An open box is applied (as clicking away applies it) and closed before an Undo or Redo step, so it never shows a state the document has left; text it can't apply keeps it open and stops the step.