Bug 62423. Alt+down now opens history list in URL bar. r=ben, sr=hewitt

This commit is contained in:
aaronl%netscape.com 2001-12-17 07:44:57 +00:00
parent 12cb96f2dd
commit ab93285bed
5 changed files with 29 additions and 25 deletions

View File

@ -106,11 +106,11 @@ var personalToolbarObserver = {
if (aEvent.target.getAttribute("type") == "http://home.netscape.com/NC-rdf#Folder") {
var child = aEvent.target.childNodes[0];
if (child && child.localName == "menupopup")
child.closePopup();
child.hidePopup();
else {
var parent = aEvent.target.parentNode;
if (parent && parent.localName == "menupopup")
parent.closePopup();
parent.hidePopup();
}
}
}
@ -438,7 +438,7 @@ var bookmarksButtonObserver = {
{
aEvent.target.setAttribute("dragover", "true");
if (!gDidOpen) {
aEvent.target.firstChild.openPopup(document.getElementById("bookmarks-button"), -1, -1, "menupopup", "bottomleft", "bottomleft");
aEvent.target.firstChild.showPopup(document.getElementById("bookmarks-button"), -1, -1, "menupopup", "bottomleft", "bottomleft");
gDidOpen = true;
}
return true;
@ -459,7 +459,7 @@ function closeOpenMenu()
if (gCurrentDragOverMenu && gCurrentTarget.firstChild != gCurrentDragOverMenu) {
if (gCurrentTarget.parentNode != gCurrentDragOverMenu) {
gMenuIsOpen = false;
gCurrentDragOverMenu.closePopup();
gCurrentDragOverMenu.hidePopup();
gCurrentDragOverMenu = null;
}
}
@ -475,13 +475,13 @@ var menuDNDObserver = {
if (aEvent.target.firstChild && aEvent.target.firstChild.localName == "menupopup") {
if (aEvent.target.parentNode == document.getElementById("bookmarks-button").firstChild) {
if (gCurrentDragOverMenu && gCurrentDragOverMenu != aEvent.target.firstChild) {
gCurrentDragOverMenu.closePopup();
gCurrentDragOverMenu.hidePopup();
gCurrentDragOverMenu = null;
gMenuIsOpen = false;
}
if (!gMenuIsOpen) {
gCurrentDragOverMenu = aEvent.target.firstChild;
aEvent.target.firstChild.openPopup(aEvent.target, -1, -1, "menupopup", "topright, topright");
aEvent.target.firstChild.showPopup(aEvent.target, -1, -1, "menupopup", "topright, topright");
gMenuIsOpen = true;
}
}
@ -596,7 +596,7 @@ var menuDNDObserver = {
// if user isn't rearranging within the menu, close it
if (aDragSession.sourceNode.localName != "menuitem" && aDragSession.sourceNode.localName != "menu")
setTimeout(function() { if (gCurrentDragOverMenu) gCurrentDragOverMenu.closePopup(); document.getElementById("bookmarks-button").firstChild.closePopup(); gDidOpen = false; }, 190);
setTimeout(function() { if (gCurrentDragOverMenu) gCurrentDragOverMenu.hidePopup(); document.getElementById("bookmarks-button").firstChild.hidePopup(); gDidOpen = false; }, 190);
return true;
},

View File

@ -861,10 +861,16 @@
this.closeResultPopup();
break;
case KeyEvent.DOM_VK_DOWN:
if (aEvent.altKey && !aEvent.ctrlKey && !aEvent.shiftKey && !this.hideHistory) {
var historyPopup = this.getElementsByTagName("menupopup").item(0);
if (historyPopup)
historyPopup.showPopup();
break;
}
case KeyEvent.DOM_VK_PAGE_UP:
case KeyEvent.DOM_VK_PAGE_DOWN:
case KeyEvent.DOM_VK_UP:
case KeyEvent.DOM_VK_DOWN:
this.clearTimer();
killEvent = true;
this.keyNavigation(aEvent);
@ -989,7 +995,7 @@
this.resultsPopup.setAttribute("width", w);
}
this.resultsPopup.openPopup(this, -1, -1, "popup", "bottomleft", "topleft");
this.resultsPopup.showPopup(this, -1, -1, "popup", "bottomleft", "topleft");
this.mMenuOpen = true;
}
]]></body>
@ -999,7 +1005,7 @@
<method name="closeResultPopup">
<body><![CDATA[
if (this.resultsPopup && this.mMenuOpen) {
this.resultsPopup.closePopup();
this.resultsPopup.hidePopup();
this.mMenuOpen = false;
}
]]></body>

View File

@ -485,15 +485,15 @@
]]></body>
</method>
<method name="openPopup">
<method name="showPopup">
<body><![CDATA[
this.mPicker.parentNode.openPopup(this, -1, -1, "popup", "bottomleft", "topleft");
this.mPicker.parentNode.showPopup(this, -1, -1, "popup", "bottomleft", "topleft");
]]></body>
</method>
<method name="closePopup">
<method name="hidePopup">
<body><![CDATA[
this.mPicker.parentNode.closePopup();
this.mPicker.parentNode.hidePopup();
]]></body>
</method>
@ -524,7 +524,7 @@
<method name="pickerChange">
<body><![CDATA[
this.color = this.mPicker.color;
setTimeout(function(aPopup) { aPopup.closePopup() }, 1, this.mPicker.parentNode);
setTimeout(function(aPopup) { aPopup.hidePopup() }, 1, this.mPicker.parentNode);
if (this.onchange)
this.onchange();
@ -542,7 +542,7 @@
// open popup if key is space/up/left/right/down and popup is closed
if ( (event.keyCode == 32 || (event.keyCode > 36 && event.keyCode < 41)) && !this.mOpen)
this.openPopup();
this.showPopup();
]]></handler>
<handler event="mousedown"><![CDATA[
@ -551,7 +551,7 @@
// get it to recognize the popupalign and popupanchor attributes that way
// So, I have to do it manually...
this.focus();
this.openPopup();
this.showPopup();
]]></handler>
</handlers>
</binding>

View File

@ -420,7 +420,7 @@
if (!popups[0].hasAttribute("open")) {
event.preventDefault();
popups[0].openPopup(this, -1, -1, "popup", "bottomleft", "topleft");
popups[0].showPopup(this, -1, -1, "popup", "bottomleft", "topleft");
this._selectInputFieldValueInList();
}

View File

@ -39,8 +39,7 @@
</getter>
</property>
<!-- XXXben should become showPopup -->
<method name="openPopup">
<method name="showPopup">
<parameter name="element"/>
<parameter name="xpos"/>
<parameter name="ypos"/>
@ -65,8 +64,7 @@
</body>
</method>
<!-- XXXben should become hidePopup -->
<method name="closePopup">
<method name="hidePopup">
<body>
<![CDATA[
var popupBox = null;
@ -189,7 +187,7 @@
if (!rel) {
++this._mouseOutCount;
if (this._mouseOutCount > 1)
this.closePopup();
this.hidePopup();
return;
}
@ -202,7 +200,7 @@
// if the entered node is not a descendant of ours, hide the tooltip
if (rel != this && this._isMouseOver) {
this.closePopup();
this.hidePopup();
}
]]></handler>
@ -225,7 +223,7 @@
// XXX commenting this out for now because it doesn't work on Mac
// become mouseover isn't fired when the tooltip appears with the mouse over it
//if (this.hasAttribute("titletip"))
// window.setTimeout(function(me) { if (!me._isMouseOver) me.closePopup(); }, 100, this);
// window.setTimeout(function(me) { if (!me._isMouseOver) me.hidePopup(); }, 100, this);
]]>
</handler>