Skip to content

FieldStatus: menus are enabled even though field is disabled#2127

Open
cguglielmo wants to merge 1 commit intoreleases/26.1from
features/cgu/26.1/field_status
Open

FieldStatus: menus are enabled even though field is disabled#2127
cguglielmo wants to merge 1 commit intoreleases/26.1from
features/cgu/26.1/field_status

Conversation

@cguglielmo
Copy link
Copy Markdown
Member

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants