FieldStatus: menus are enabled even though field is disabled#2121
Open
cguglielmo wants to merge 1 commit intoreleases/26.2from
Open
FieldStatus: menus are enabled even though field is disabled#2121cguglielmo wants to merge 1 commit intoreleases/26.2from
cguglielmo wants to merge 1 commit intoreleases/26.2from
Conversation
If a field is disabled, the menus should be disabled as well, unless they have inheritAccessibility set to false. This broke with commit 811f996. Before that commit, the field status was accessible even if it was disabled -> it ignored the enabled property completely, which was confusing. This is why inheritAccessibility was set to false on the field status and the css rules and click handlers were adjusted to respect the enabled property. Unfortunately, the child menus are now always enabled because their parent (field status if a context menu is open) is always enabled. To fix it, the field status now passes the enabled state of its parent to its children instead of its own state when the enabled state of its children is computed. Note: a regular menu has a slight different semantic: it is disabled, if every child menu is disabled and enabled, if a child menu is enabled. This would be a good behavior for field status as well, but the field status is not a menu and that behavior is implemented only for menus (see Menu.ts#recomputeEnabled) 455532
9143d36 to
a9686f4
Compare
bschwarzent
approved these changes
Apr 2, 2026
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.
If a field is disabled, the menus should be disabled as well, unless they have inheritAccessibility set to false. This broke with commit 811f996.
Before that commit, the field status was accessible even if it was disabled -> it ignored the enabled property completely, which was confusing. This is why inheritAccessibility was set to false on the field status and the css rules and click handlers were adjusted to respect the enabled property. Unfortunately, the child menus are now always enabled because their parent (field status if a context menu is open) is always enabled.
To fix it, the field status now passes the enabled state of its parent to its children instead of its own state when the enabled state of its children is computed.
Note: a regular menu has a slight different semantic: it is disabled, if every child menu is disabled and enabled, if a child menu is enabled. This would be a good behavior for field status as well, but the field status is not a menu and that behavior is implemented only for menus (see Menu.ts#recomputeEnabled)
455532