Bug 631954 - Right-clicking on back button menu item opens additional back button menu. r=gavin

This commit is contained in:
Dão Gottwald 2011-05-20 11:20:53 +02:00
Родитель 4e65ac9cf3
Коммит b7257afee6
1 изменённых файлов: 12 добавлений и 6 удалений

Просмотреть файл

@ -306,22 +306,28 @@ function SetClickAndHoldHandlers() {
aElm.addEventListener("click", clickHandler, true);
}
// Bug 414797: Clone the dropmarker's menu into both the back and
// the forward buttons.
// Bug 414797: Clone unified-back-forward-button's context menu into both the
// back and the forward buttons.
var unifiedButton = document.getElementById("unified-back-forward-button");
if (unifiedButton && !unifiedButton._clickHandlersAttached) {
var popup = document.getElementById("backForwardMenu").cloneNode(true);
unifiedButton._clickHandlersAttached = true;
let popup = document.getElementById("backForwardMenu").cloneNode(true);
popup.removeAttribute("id");
var backButton = document.getElementById("back-button");
// Prevent the context attribute on unified-back-forward-button from being
// inherited.
popup.setAttribute("context", "");
let backButton = document.getElementById("back-button");
backButton.setAttribute("type", "menu");
backButton.appendChild(popup);
_addClickAndHoldListenersOnElement(backButton);
var forwardButton = document.getElementById("forward-button");
let forwardButton = document.getElementById("forward-button");
popup = popup.cloneNode(true);
forwardButton.setAttribute("type", "menu");
forwardButton.appendChild(popup);
_addClickAndHoldListenersOnElement(forwardButton);
unifiedButton._clickHandlersAttached = true;
}
}