[Pale-Moon] Issue #1701 - Allow Open All in Tabs for containers with only one child URI

This commit is contained in:
FranklinDM 2021-04-21 11:29:09 +08:00 committed by roytam1
commit d846ef7bee
2 changed files with 2 additions and 2 deletions

View file

@ -633,7 +633,7 @@ PlacesController.prototype = {
if (!openContainerInTabsItem.hidden) {
var containerToUse = this._view.selectedNode || this._view.result.root;
if (PlacesUtils.nodeIsContainer(containerToUse)) {
if (!PlacesUtils.hasChildURIs(containerToUse, true)) {
if (!PlacesUtils.hasChildURIs(containerToUse)) {
openContainerInTabsItem.disabled = true;
// Ensure that we don't display the menu if nothing is enabled:
usableItemCount--;

View file

@ -36,7 +36,7 @@ var SidebarUtils = {
var openInTabs = isContainer &&
(aEvent.button == 1 ||
(aEvent.button == 0 && modifKey)) &&
PlacesUtils.hasChildURIs(tbo.view.nodeForTreeIndex(cell.row), true);
PlacesUtils.hasChildURIs(tbo.view.nodeForTreeIndex(cell.row));
if (aEvent.button == 0 && isContainer && !openInTabs) {
tbo.view.toggleOpenState(cell.row);