fix: respect disabled parent when syncing client disabled state (#10023) (CP: 25.3) - #10026
Merged
Merged
Conversation
## Description `DisableOnClickController` forces the client-side `disabled` property from `setEnabled`, because Flow does not send a change when a component is disabled and re-enabled in the same round trip. It used the value passed to `setEnabled`, so enabling a button under a disabled parent cleared `disabled` on the client while the server kept rejecting clicks. - Changed `DisableOnClickController.onSetEnabled()` to schedule the client update with `beforeClientResponse` and read the effective enabled state at that point, so a disabled parent keeps the component disabled on the client - Coalesced repeated `setEnabled` calls in one round trip into a single client update - Deferred the update until the component is attached instead of queueing a JavaScript call per `setEnabled` call while detached - Removed the unused `enabled` parameter from `onSetEnabled()` and updated `Button` and `MenuItemBase` - Added unit tests for the disabled parent, same round trip, and detached cases ## Type of change - Bugfix --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
|
web-padawan
approved these changes
Sep 4, 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.



This PR cherry-picks changes from the original PR #10023 to branch 25.3.
Original PR description