Close dropdown after executed action workaround#19305
Merged
iOvergaard merged 2 commits intorelease/16.0from May 13, 2025
Merged
Close dropdown after executed action workaround#19305iOvergaard merged 2 commits intorelease/16.0from
iOvergaard merged 2 commits intorelease/16.0from
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a workaround for the dropdown toggling bug by replacing the binding to the .open property with explicit method calls.
- In entity-actions-bundle.element.ts, the _dropdownIsOpen state is removed and replaced with a query-based dropdown element that calls closeDropdown() when an action is executed.
- In dropdown.element.ts, the updated() lifecycle now warns users and calls openDropdown() or closeDropdown() directly instead of relying on the non-functional .open property.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts | Removed state-based toggling and replaced it with direct method calls on the dropdown element. |
| src/Umbraco.Web.UI.Client/src/packages/core/components/dropdown/dropdown.element.ts | Updated the lifecycle to warn against using the .open property and to invoke the new dropdown methods. |
...I.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts
Show resolved
Hide resolved
src/Umbraco.Web.UI.Client/src/packages/core/components/dropdown/dropdown.element.ts
Outdated
Show resolved
Hide resolved
iOvergaard
approved these changes
May 13, 2025
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.
This PR is a workaround for the bug and fixes #19295
For one reason or another, the 'umb-dropdown
doesn't toggle the popover when the.open` property is set. I have added two methods to open and close the dropdown, which do the same thing but actually work.