fix: Fixed selecting tab not scrolling, b=(no-bug), c=tabs, workspaces

This commit is contained in:
Mr. M
2025-05-18 23:12:23 +02:00
parent 76c22cc896
commit d908700a9c
3 changed files with 9 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..f326895a66dcbd4961cb1a4e8310ae80a181b60e 100644
index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..de050862141ea4b127bedd34add8d515806d766b 100644
--- a/browser/components/tabbrowser/content/tabs.js
+++ b/browser/components/tabbrowser/content/tabs.js
@@ -83,7 +83,7 @@
@@ -393,7 +393,7 @@ index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..f326895a66dcbd4961cb1a4e8310ae80
let translateX = event.screenX - dragData.screenX;
let translateY = event.screenY - dragData.screenY;
@@ -2407,14 +2450,23 @@
@@ -2407,12 +2450,21 @@
let lastTab = tabs.at(-1);
let lastMovingTab = movingTabs.at(-1);
let firstMovingTab = movingTabs[0];
@@ -414,11 +414,8 @@ index ef9c0389ec926e6bc01c0dc3b883beceaf1f7d43..f326895a66dcbd4961cb1a4e8310ae80
- if (!isPinned) {
+ if (true) {
translate +=
- this.arrowScrollbox.scrollbox[scrollDirection] - dragData.scrollPos;
+ gZenWorkspaces.activeScrollbox.scrollbox[scrollDirection] - dragData.scrollPos;
this.arrowScrollbox.scrollbox[scrollDirection] - dragData.scrollPos;
} else if (isPinned && this.verticalMode) {
translate +=
this.verticalPinnedTabsContainer.scrollTop - dragData.scrollPos;
@@ -2431,6 +2483,9 @@
// Shift the `.tab-group-label-container` to shift the label element.
item = item.parentElement;

View File

@@ -54,6 +54,10 @@
false
);
this.scrollbox.addEventListener('wheel', gBrowser.tabContainer, true);
this.scrollbox.addEventListener('underflow', gBrowser.tabContainer);
this.scrollbox.addEventListener('overflow', gBrowser.tabContainer);
this.scrollbox._getScrollableElements = () => {
const children = [...this.pinnedTabsContainer.children, ...this.tabsContainer.children];
if (Services.prefs.getBoolPref('zen.view.show-newtab-button-top', false)) {

View File

@@ -2392,6 +2392,8 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
// Recalculate new tab observers
gBrowser.tabContainer.observe(null, 'nsPref:changed', 'privacy.userContext.enabled');
gBrowser.tabContainer.arrowScrollbox = this.activeScrollbox;
// Update workspace UI
await this._updateWorkspacesChangeContextMenu();
// gZenUIManager.updateTabsToolbar();