fix: preserve folder path suggester clicks#1211
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR fixes folder path suggestion selection by unconditionally preventing default mousedown behavior in the suggestion dropdown, preventing the input from losing focus before click selection registers. A new test validates the complete interaction flow. ChangesSuggestion Selection
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying quickadd with
|
| Latest commit: |
150993c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4ffa60a1.quickadd.pages.dev |
| Branch Preview URL: | https://fix-1210-folder-path-selecti.quickadd.pages.dev |
|
🎉 This PR is included in version 2.12.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
🚀 Release has been published: v2.12.2 |
Prevent suggestion popups from closing on mousedown before their click handler can select an item. This restores the folder-path picker in template settings on Obsidian 1.12.x, where clicking a folder suggestion blurred the input and left the typed query in place.
The fix keeps focus while mousing down inside the suggester popup, matching the pre-2.12.1 behavior. I added a regression test for the mousedown/blur/click ordering that previously dropped the selection.
Validation:
devvault before the fix: CDP click onAdventureleft the folder path input asAdv, focusedBODY, and the folder list stayed empty.bun run testbun run build-with-lintdevvault and reran the same CDP path: clickingAdventurechanged the input toAdventure; clicking Add renderedAdventurein the folder list;obsidian vault=dev dev:errorsreported no captured errors.Fixes #1210
Summary by CodeRabbit
Tests
Bug Fixes