Skip to content
Browse files
Web Inspector: Layout overlay color swatches don't update saved color…
… until popover is dismissed

Reviewed by Devin Rousso.

We should save all changes to layout overlay color, not just the state when you close the color picker popover. Not
doing this causes a few issues:
1. DOM node badge colors don't update as you dynamically adjust the color for an overlay.
2. The new "sample color from screen" can be used without opening the popover for the color picker, which means these
changes are never saved.

Canonical link:
git-svn-id: 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
patrickangle committed Jun 3, 2022
1 parent 2e79d84 commit bc34b05b395e971d14ce3a3c7f845f414a3180be
Showing 2 changed files with 3 additions and 5 deletions.
@@ -709,6 +709,9 @@ WI.DOMNode = class DOMNode extends WI.Object

this._layoutOverlayColorSetting.value = color.hsl;

if (this._layoutOverlayShowing)

@@ -125,11 +125,6 @@ WI.NodeOverlayListSection = class NodeOverlayListSection extends WI.View

swatch.addEventListener(WI.InlineSwatch.Event.ValueChanged, (event) => {
if (checkboxElement?.checked)
}, swatch);

swatch.addEventListener(WI.InlineSwatch.Event.Deactivated, (event) => {
domNode.layoutOverlayColor =;
}, swatch);

0 comments on commit bc34b05

Please sign in to comment.