mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 400924 - Clicking on the star icon when the bookmarking panel is opened should close the panel. r=sspitzer, a=mconnor.
This commit is contained in:
parent
1ef66b82b8
commit
89b1516e9d
@ -50,7 +50,11 @@ var PlacesCommandHook = {
|
||||
|
||||
// Edit-bookmark panel
|
||||
get panel() {
|
||||
return document.getElementById("editBookmarkPanel");
|
||||
delete this.panel;
|
||||
var element = document.getElementById("editBookmarkPanel");
|
||||
element.addEventListener("popuphiding", this, false);
|
||||
element.addEventListener("keypress", this, true);
|
||||
return this.panel = element;
|
||||
},
|
||||
|
||||
// list of command elements (by id) to disable when the panel is opened
|
||||
@ -129,13 +133,15 @@ var PlacesCommandHook = {
|
||||
this._overlayLoading = true;
|
||||
document.loadOverlay("chrome://browser/content/places/editBookmarkOverlay.xul",
|
||||
loadObserver);
|
||||
this.panel.addEventListener("popuphiding", this, false);
|
||||
},
|
||||
|
||||
_doShowEditBookmarkPanel:
|
||||
function PCH__doShowEditBookmarkPanel(aItemId, aAnchorElement, aPosition) {
|
||||
this.panel.addEventListener("keypress", this, true);
|
||||
this._blockCommands(); // un-done in the popuphiding handler
|
||||
|
||||
// Consume dismiss clicks, see bug 400924
|
||||
this.panel.popupBoxObject
|
||||
.setConsumeRollupEvent(Ci.nsIPopupBoxObject.ROLLUP_CONSUME);
|
||||
this.panel.openPopup(aAnchorElement, aPosition, -1, -1);
|
||||
|
||||
gEditItemOverlay.initPanel(aItemId,
|
||||
|
Loading…
Reference in New Issue
Block a user