зеркало из https://github.com/mozilla/gecko-dev.git
Bug 234717, 234116, Context menu commands don't work in *subfolders* of bookmarks menu. Remove the last two children instead of using getElementsByAttributes. The latter is no more needed, since now, insertion of bookmarks with DND occurs at the correct location. YAW--.
This commit is contained in:
Родитель
9e7b68743e
Коммит
7ada155800
|
@ -83,17 +83,11 @@ var BookmarksMenu = {
|
|||
// hides the 'Open in Tabs' on popuphidden so that we won't duplicate it -->
|
||||
hideOpenInTabsMenuItem: function (aTarget)
|
||||
{
|
||||
# sometimes insertions occur between the "open in tabs" menuitem and
|
||||
# menuseparator. the eventual children of the menupopup have should
|
||||
# have already been closed at this stage, so it''s ok to grab the first
|
||||
# "open in tabs" menuitem and menuseparator.
|
||||
var nodeList;
|
||||
nodeList = aTarget.getElementsByAttribute("class", "openintabs-menuitem");
|
||||
if (nodeList.length > 0)
|
||||
aTarget.removeChild(nodeList[0]);
|
||||
nodeList = aTarget.getElementsByAttribute("class", "openintabs-menuseparator");
|
||||
if (nodeList.length > 0)
|
||||
aTarget.removeChild(nodeList[0]);
|
||||
if (aTarget.hasChildNodes() &&
|
||||
aTarget.lastChild.getAttribute("class") == "openintabs-menuitem") {
|
||||
aTarget.removeChild(aTarget.lastChild);
|
||||
aTarget.removeChild(aTarget.lastChild);
|
||||
}
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче