force popup widget to be invisible when the menu is not explicitly open. bug 120155 r=bryner,hyatt a=scc

git-svn-id: svn://10.0.0.236/trunk@119807 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
danm%netscape.com 2002-04-25 01:22:13 +00:00
parent c27013e6aa
commit 286123ea27
2 changed files with 10 additions and 2 deletions

View File

@ -7,6 +7,12 @@
display: -moz-popup !important;
}
/* the C++ implementation of widgets is too eager to make popups visible.
this causes problems (bug 120155 and others), thus this workaround: */
.autocomplete-result-popup[hidden="true"] {
visibility: hidden;
}
/* The following rule is here to fix bug 96899 (and now 117952).
Somehow trees create a situation
in which a popupset flows itself as if its popup child is directly within it
@ -19,4 +25,4 @@ popupset {
treecolpicker {
display: none;
}
}

View File

@ -30,7 +30,7 @@
xbl:inherits="open,hidden=disablehistory" anonid="historydropmarker"/>
<xul:popupset>
<xul:popup ignorekeys="true" anonid="popup" class="autocomplete-result-popup" xbl:inherits="for=id,nomatch"/>
<xul:popup ignorekeys="true" anonid="popup" class="autocomplete-result-popup" hidden="true" xbl:inherits="for=id,nomatch"/>
</xul:popupset>
<children includes="menupopup"/>
@ -999,6 +999,7 @@
var w = this.boxObject.width;
if (w != this.resultsPopup.boxObject.width)
this.resultsPopup.setAttribute("width", w);
this.resultsPopup.removeAttribute("hidden");
this.resultsPopup.showPopup(this, -1, -1, "popup", "bottomleft", "topleft");
this.mMenuOpen = true;
}
@ -1010,6 +1011,7 @@
<body><![CDATA[
if (this.resultsPopup && this.mMenuOpen) {
this.resultsPopup.hidePopup();
this.resultsPopup.setAttribute("hidden", "true");
this.mMenuOpen = false;
}
]]></body>