[SDESK-7940] Fix metadata dropdown reset timing#5216
Merged
BrianMwangi21 merged 4 commits intoJun 10, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the custom vocabulary (CV) metadata terms dropdown behavior to avoid subgroup navigation “bouncing” back to the root/preferred view (notably observed in newer Chrome focus/blur timing), by deferring when dropdown state is reset.
Changes:
- Removed the
sd-typeaheadclosehook that previously reset dropdown navigation/search state. - Added a reset trigger tied to the dropdown open/close lifecycle (via
dropdown.isOpenwatch) to reset state on close instead of on typeahead blur. - Aimed to preserve subgroup navigation state while the dropdown remains open.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/apps/authoring/metadata/views/metadata-terms.html | Removes sd-typeahead close handler that reset state, intending to prevent premature resets during subgroup navigation. |
| scripts/apps/authoring/metadata/metadata.ts | Updates dropdown focus directive watch to invoke resetDropdownState() when the dropdown closes (when available on scope). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
eos87
approved these changes
Jun 10, 2026
BrianMwangi21
added a commit
to BrianMwangi21/superdesk-client-core
that referenced
this pull request
Jun 10, 2026
* [SDESK-7940] Fix metadata dropdown reset timing * Fixed lint issue * Fixed lint issue * Suggested fixes (cherry picked from commit 588331b)
BrianMwangi21
added a commit
that referenced
this pull request
Jun 10, 2026
…lop (#5218) * [SDESK-7940] - Selecting CV items parent not working properly first time in desks with preffered items set (#5199) * [SDESK-7940] Fix metadata dropdown search state * [SDESK-7940] Fix tree search test * [SDESK-7940] Stabilize tree search spec * [SDESK-7940] Fix tree search spec key * suggested fixes * simlify checking using old value * Fixed lint issue (cherry picked from commit af87f24) * [SDESK-7940] Fix metadata dropdown reset timing (#5216) * [SDESK-7940] Fix metadata dropdown reset timing * Fixed lint issue * Fixed lint issue * Suggested fixes (cherry picked from commit 588331b)
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.
Purpose
This builds on #5199 and reworks the metadata CV dropdown reset behavior after it was noticed the subgroup navigation could bounce back to the root/preferred view in newer Chrome versions. One theory is that Chrome’s focus/blur timing exposed the issue, so the dropdown flow has been adjusted to avoid resetting subgroup state too early.
What has changed
Steps to test
Screenshots
screen-capture.21.mp4
Checklist
Resolves: SDESK-7940