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
Multi-window: closing a window can close the wrong document, and the save prompt can lock up #7822
With two or more document windows open, closing a window can close the wrong document, and the close guard (the "save changes?" prompt) can lock up for good. This is the one open data-loss risk after the craft-ui port (#7101).
Causes, from the #7317 audit (read from the code, not re-verified):
W1-1 (C5-1..3): the fallback for a host without separate viewports is split between !viewports_available() and !opens_windows(); closing acts on root_key() instead of the document the window shows (shown); ui.closeWindow should resolve the active_viewport().
W1-2 (C5-4):CloseGuard isn't serialised (self.closing), the prompt isn't bound to the WindowId that owns it, and sync_document doesn't reconcile before follow_in_windows, which leaves a permanent Hold.
W1-3 (C5-6/7, P2): with three windows, other_window_on_document should filter w.doc == doc, and queue_for_window should repaint the target viewport.
craft-libs: C5-5 (cursor::image_target rejects non-ROOT viewports) and C5-8 (the UI test kit's Windows supports one child; three-window tests need N).
storytold/craft-libs#3290 (one modal stack across viewports) lands with the next repin and changes part of this; design the fix after that repin. Needs a short spec first (close paths, prompt ownership, fallback hosts) and a test per close path.
Activity
#7822: Spec, plan and ADR for closing document windows (#7840)
Windowless root: every document window is a child; X11 keeps the visi…
Windowless root: save window place every frame, raise Save prompt on …
Windowless root: only the first window takes the saved place; a promo…
Windowless root: files dropped on a document window reach the intake (#…
Multi-window: file.close save, ui.closeWindow window, close-prompt co…