Repository navigation
fix: write the shadow-scale Add button's disabled flag only when it changes - #5261
Merged
Merged
Conversation
…hanges The disabled setter rewrites the attribute on every set, so each repaint at the layer limit restated it and the write watch failed the navigation sweep. toggleAttribute writes only a change. The Add button's states are unchanged. Closes #5181
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.
The shadow-scale playground (from #4875) set
this.#parts.add.disabledon every repaint. Thedisabledsetter rewrites the attribute even when its value is already set, so each repaint at the layer limit restated the flag. The suite's write watch reports that asunchanged write: disabled on button.ws-add, which failedtest_presses_and_fills_leave_no_element_naming_stale_keys[shadow-scale]on Linux and macOS in the scheduled run. The paint now callstoggleAttribute("disabled", …), which writes only when the flag changes. Thekeeps.jsheader recommends this for a flag. The button is disabled in the same states as before.The journey failed on current main with that exact message and passes with the change.
test_a_page_drawn_preset_sets_its_whole_slice_as_one_gestureintests/browser/widgets/test_playgrounds.pyalso still passes.Closes #5181 — automated triage