Bug 1509004 - Flexbox highlighter remains in place when toggling display:flex in the styles r=gl

Differential Revision: https://phabricator.services.mozilla.com/D12665

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Michael Ratcliffe 2018-11-28 16:40:20 +00:00
parent a3f9c057c2
commit 3ed091cf70

View File

@ -747,6 +747,18 @@ class FlexboxHighlighter extends AutoRefreshHighlighter {
}
_update() {
// If this.currentNode is not a flex container we have nothing to highlight.
// We can't simply use getAsFlexContainer() here because this fails for
// text fields. This will be removed by https://bugzil.la/1509460.
if (!this.computedStyle) {
this.computedStyle = getComputedStyle(this.currentNode);
}
if (this.computedStyle.display !== "flex" &&
this.computedStyle.display !== "inline-flex") {
return false;
}
setIgnoreLayoutChanges(true);
const root = this.getElement("root");