Bug 1474364 - Clear the stored flexbox highlighter shown before emitting the event. r=pbro
MozReview-Commit-ID: BWDX2nMjnx8
--- a/devtools/client/inspector/shared/highlighters-overlay.js
+++ b/devtools/client/inspector/shared/highlighters-overlay.js
@@ -280,18 +280,19 @@ class HighlightersOverlay {
}
this._toggleRuleViewIcon(node, false, ".ruleview-flex");
await this.highlighters.FlexboxHighlighter.hide();
// Emit the NodeFront of the flexbox container element that the flexbox highlighter
// was hidden for.
- this.emit("flexbox-highlighter-hidden", this.flexboxHighlighterShown);
+ const nodeFront = this.flexboxHighlighterShown;
this.flexboxHighlighterShown = null;
+ this.emit("flexbox-highlighter-hidden", nodeFront);
// Erase flexbox highlighter state.
this.state.flexbox = null;
}
/**
* Create a grid highlighter settings object for the provided nodeFront.
*