Merge remote-tracking branch 'origin/master' into custom

This commit is contained in:
roytam1 2021-04-23 09:23:01 +08:00
commit 46c9b4df6f
11 changed files with 42 additions and 11 deletions

View file

@ -759,7 +759,9 @@ this.PlacesUIUtils = {
if (PlacesUtils.nodeIsURI(aNodes[i]))
urlsToOpen.push({uri: aNodes[i].uri, isBookmark: PlacesUtils.nodeIsBookmark(aNodes[i])});
}
this._openTabset(urlsToOpen, aEvent, window);
if (this._confirmOpenInTabs(urlsToOpen.length, window)) {
this._openTabset(urlsToOpen, aEvent, window);
}
},
/**

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);