Repository navigation
fix(peek): restack a resumed prompt above modals opened during the peek - #2238
Conversation
A modal another plugin opens while a prompt is peeked stays on top after Return, so the prompt is hidden while it holds focus (#2235).
Returning to a peeked prompt only removed its hidden class. Obsidian stacks modals of equal z-index in DOM order, so a modal another plugin opened during the peek, such as Full Calendar Remastered's event dialog, covered the prompt while the prompt held the keyboard. Re-appending the prompt's container on resume puts it back on top. Refs #2235, #2234
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
What I tried to reproduce the blank one-page form from #2235. None of these showed a form without fields.
The reporter mentions "OK" buttons. The one-page form's button is "Submit". "Ok" is on the single prompt. |
|
Independent verification: PASS Verified head 1. The PR's spec, parent against head. At fc97462 (tests only, bug present) both cases fail at the check after Return: At 2a51c94 (fix): 2. My own drive, not the spec. Driven through At the head build, in both modes:
The same script on the base build (45cd3fb) reports 3. Checks at 2a51c94. The known accepted gaps (Android Back after Return, Ctrl/Cmd+Shift+E while another plugin's modal is open) were not exercised. Nothing worse was seen. |
|
Independent verification, round 2: PASS Verified the landing result of head 1. Both specs, parent against head. At At 2. My own drive, not the spec. A bash script over At the landing tree, in both modes:
The same script at 3. Checks at the landing tree. The known accepted gaps (Android Back after Return, Ctrl/Cmd+Shift+E returning to a peeked prompt while another plugin's modal is open) were not exercised. Nothing worse was seen. The Obsidian instance is stopped. |
Why
When you peek at the note from a QuickAdd prompt, open another plugin's modal (here Full Calendar Remastered's New Event dialog), and then select Return, the prompt comes back under that modal. Obsidian stacks modals in DOM order. The prompt has the keyboard focus but you cannot see it, and Escape cancels the QuickAdd run. This is the "prompt buried behind other modals" part of #2235 and of #2234.
What changed
Scope
Tradeoffs
Verification
tests/e2e/prompt-peek-stacking.test.ts. On master it fails in both prompt kinds withexpected 'covered by New Event' to be true. With the fix it passes 2/2. A unit test inInputPromptPeek.test.tscovers the same order for CI.pnpm run lintpasses.pnpm run testpasses, 6881 tests.Before:
After:
Refs #2235, #2234