mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-27 21:48:40 +00:00
fix: Small fixes when cancelling new empty split view, b=no-bug, c=common, split-view, workspaces
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
- name: zen.tabs.show-newtab-vertical
|
||||
value: true
|
||||
|
||||
- name: zen.tabs.close-window-with-empty
|
||||
value: true
|
||||
|
||||
- name: zen.ctrlTab.show-pending-tabs
|
||||
value: false
|
||||
|
||||
|
12
src/browser/components/urlbar/UrlbarPrefs-sys-mjs.patch
Normal file
12
src/browser/components/urlbar/UrlbarPrefs-sys-mjs.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarPrefs.sys.mjs b/browser/components/urlbar/UrlbarPrefs.sys.mjs
|
||||
index 3c179db3b310c43f8c6c06b1ecbcf5ed59feefe6..693bef15401cd4428c8a0222de57b83b78564194 100644
|
||||
--- a/browser/components/urlbar/UrlbarPrefs.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarPrefs.sys.mjs
|
||||
@@ -719,6 +719,7 @@ function makeResultGroups({ showSearchSuggestionsFirst }) {
|
||||
*/
|
||||
let rootGroup = {
|
||||
children: [
|
||||
+ { group: lazy.UrlbarUtils.RESULT_GROUP.ZEN_ACTION },
|
||||
// heuristic
|
||||
{
|
||||
maxResultCount: 1,
|
21
src/browser/components/urlbar/UrlbarUtils-sys-mjs.patch
Normal file
21
src/browser/components/urlbar/UrlbarUtils-sys-mjs.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarUtils.sys.mjs b/browser/components/urlbar/UrlbarUtils.sys.mjs
|
||||
index 0bc15c02f56dd8f46a21fed02b4e21a741f27f41..b69a4d34f700637bd352620c520b989cf00fa39f 100644
|
||||
--- a/browser/components/urlbar/UrlbarUtils.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarUtils.sys.mjs
|
||||
@@ -75,6 +75,7 @@ export var UrlbarUtils = {
|
||||
RESTRICT_SEARCH_KEYWORD: "restrictSearchKeyword",
|
||||
SUGGESTED_INDEX: "suggestedIndex",
|
||||
TAIL_SUGGESTION: "tailSuggestion",
|
||||
+ ZEN_ACTION: "zenAction",
|
||||
}),
|
||||
|
||||
// Defines provider types.
|
||||
@@ -576,6 +577,8 @@ export var UrlbarUtils = {
|
||||
return this.RESULT_GROUP.INPUT_HISTORY;
|
||||
case "UrlbarProviderQuickSuggest":
|
||||
return this.RESULT_GROUP.GENERAL_PARENT;
|
||||
+ case "ZenUrlbarProviderGlobalActions":
|
||||
+ return this.RESULT_GROUP.ZEN_ACTION;
|
||||
default:
|
||||
break;
|
||||
}
|
@@ -643,7 +643,8 @@ var gZenVerticalTabsManager = {
|
||||
!aItem.isConnected ||
|
||||
gZenUIManager.testingEnabled ||
|
||||
!gZenStartup.isReady ||
|
||||
!gZenPinnedTabManager.hasInitializedPins
|
||||
!gZenPinnedTabManager.hasInitializedPins ||
|
||||
aItem.group?.hasAttribute('split-view-group')
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
@@ -889,8 +889,10 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
|
||||
removeGroup(groupIndex) {
|
||||
const group = this._data[groupIndex];
|
||||
for (const tab of group.tabs.reverse()) {
|
||||
if (tab.group?.hasAttribute('split-view-group')) {
|
||||
gBrowser.ungroupTab(tab);
|
||||
}
|
||||
}
|
||||
if (this.currentView === groupIndex) {
|
||||
this.deactivateCurrentSplitView();
|
||||
}
|
||||
@@ -1951,7 +1953,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
|
||||
const groupIndex = this._data.findIndex((group) => group.tabs.includes(emptyTab));
|
||||
const newSelectedTab = gBrowser.selectedTab;
|
||||
const cleanup = () => {
|
||||
this.removeTabFromGroup(emptyTab, groupIndex, { changeTab: !onSwitch });
|
||||
this.removeTabFromGroup(emptyTab, groupIndex, { changeTab: !onSwitch, forUnsplit: true });
|
||||
const command = document.getElementById('cmd_zenNewEmptySplit');
|
||||
command.removeAttribute('disabled');
|
||||
};
|
||||
|
@@ -3082,7 +3082,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
}
|
||||
|
||||
handleTabCloseWindow() {
|
||||
if (this.shouldCloseWindow()) {
|
||||
if (Services.prefs.getBoolPref('zen.tabs.close-window-with-empty')) {
|
||||
document.getElementById('cmd_closeWindow').doCommand();
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Browser",
|
||||
"release": {
|
||||
"displayVersion": "1.16b",
|
||||
"displayVersion": "1.16.1b",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
},
|
||||
|
Reference in New Issue
Block a user