Bug 1500689 - Only update the frame button checked state if it is visible. r=mtigley

This commit is contained in:
Gabriel Luong 2018-10-22 13:29:04 -04:00
parent 79e134e1de
commit a5bf5fa85a

View File

@ -1444,11 +1444,15 @@ Toolbox.prototype = {
this.frameButton.description = L10N.getStr("toolbox.frames.tooltip");
}
// Highlight the button when a child frame is selected
// Highlight the button when a child frame is selected and visible.
const selectedFrame = this.frameMap.get(this.selectedFrameId) || {};
this.frameButton.isChecked = selectedFrame.parentID != null;
const isVisible = this._commandIsVisible(this.frameButton);
this.frameButton.isVisible = this._commandIsVisible(this.frameButton);
this.frameButton.isVisible = isVisible;
if (isVisible) {
this.frameButton.isChecked = selectedFrame.parentID != null;
}
},
/**