Repository navigation
fix(browser): picking a saved view no longer reopens its menu - #960
Merged
Merged
Conversation
After a saved view was picked from the settings drawer's "Load Saved View" combobox, the view loaded but the menu popped back open with focus still in the input. Vuetify closes the menu on select and keeps focus in the combobox. When the view's settings land, the component's deep settings watcher clears the combobox model. VCombobox's model watcher then sets its search text to '', and its search watcher opens the menu whenever the field is focused and the menu is closed. The watcher now blurs the combobox before clearing a picked view, so the name still clears and the menu stays shut. It only blurs when the model holds a picked view (an object with a pk). Every browse page load re-sets settings.breadcrumbs, which fires the same watcher. An unconditional blur closed a menu the user had opened while a page was still loading. Checked in a real browser: mouse and keyboard picks, a view whose settings match the current ones, and opening the menu mid page load. Also checked merged with the unpushed per-view trash icon branch: a pick from its item slot, and its Delete View dialog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After you pick a saved view from the settings drawer's Load Saved View combobox, the view loads (
GET …/saved-settings/<pk>→ 200). Then the dropdown pops back open, with focus still in the input.Cause
I confirmed this in a real browser with a timeline of menu state and store actions:
closeOnSelectcloses the menu, and focus stays in the combobox input.loadSavedSettings→setSettingschangessettings. The component's deepbrowserSettingswatcher setsselectedName = null.watch(model)then sets_search = ''. Itswatch(_search)setsmenu = truebecauseisFocused && !menu, so the menu reopens.In the timeline, the menu closes at +34 ms and reopens at +95 ms, right when
setSettingsfinishes. ClearingselectedNameby hand while the input is focused and the menu is closed reopens it too.Fix
The watcher now blurs the combobox before it clears a picked view, meaning a model that is an object with a
pk. The name still clears, and the menu stays shut.The blur is limited to picked views because every
loadBrowserPagere-setssettings.breadcrumbs, which fires the same watcher. My first try blurred on every call. It closed a menu the user had opened while a page load was still in flight. A test now covers that case.Verification
bin/dev.sh, fresh worktree DB): I saved a throwaway view and picked it by mouse (twice) and by keyboard (ArrowDown, Enter). After each pick there was no active.v-overlay--active.v-menuand the name was cleared.browser-saved-views-menu.test.js): the menu stays closed when a picked view's settings land, the name clears, and a page load doesn't close a menu opened mid-load. The first test fails without the fix. The third fails if the blur isn't limited to picked views.make fix,make lintandmake testall pass (vitest 962, pytest 1574 passed with 1 expected xfail).🤖 Generated with Claude Code