зеркало из 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 -->
|
// hides the 'Open in Tabs' on popuphidden so that we won't duplicate it -->
|
||||||
hideOpenInTabsMenuItem: function (aTarget)
|
hideOpenInTabsMenuItem: function (aTarget)
|
||||||
{
|
{
|
||||||
# sometimes insertions occur between the "open in tabs" menuitem and
|
if (aTarget.hasChildNodes() &&
|
||||||
# menuseparator. the eventual children of the menupopup have should
|
aTarget.lastChild.getAttribute("class") == "openintabs-menuitem") {
|
||||||
# have already been closed at this stage, so it''s ok to grab the first
|
aTarget.removeChild(aTarget.lastChild);
|
||||||
# "open in tabs" menuitem and menuseparator.
|
aTarget.removeChild(aTarget.lastChild);
|
||||||
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]);
|
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче