Skip to content

Capture notice in a popout shows [object DocumentFragment] and no Undo button #498

Closed

Description

@chhoumann

When a capture runs while a popout window has focus, the timestamp is saved correctly, but the notice reads [object DocumentFragment] and has no Undo button.

src/ui/undoNotice.ts builds the notice from a fragment created with activeDocument.createDocumentFragment(), which is the popout's document. Obsidian's Notice appears to test for a fragment from the main window, so the popout fragment is turned into a string.

Seen on Obsidian 1.14.4 (Linux) on master before and after #494, during the verification of #494. Evidence: master and head popout notice snapshots and a screenshot of the malformed notice.

Expected: the notice shows its message and a working Undo button, whichever window has focus.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions