1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-10 19:25:40 +02:00

Fixed crash on overflow menu in macos and fixed elements shifting on macos fullscreen

This commit is contained in:
mr. M 2025-01-24 17:41:03 +01:00
parent 952c02d3d6
commit a3bebadff8
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
3 changed files with 34 additions and 10 deletions

View file

@ -0,0 +1,19 @@
diff --git a/browser/base/content/browser-fullScreenAndPointerLock.js b/browser/base/content/browser-fullScreenAndPointerLock.js
index c61a424d3871d94e7086418c72ce22d5aef0a047..b6e3939b1ce67185acc3b9a66385869bd5490a39 100644
--- a/browser/base/content/browser-fullScreenAndPointerLock.js
+++ b/browser/base/content/browser-fullScreenAndPointerLock.js
@@ -431,10 +431,10 @@ var FullScreen = {
gNavToolbox.classList.toggle("fullscreen-with-menubar", shiftSize > 0);
let transform = shiftSize > 0 ? `translateY(${shiftSize}px)` : "";
- gNavToolbox.style.transform = transform;
- gURLBar.textbox.style.transform = gURLBar.textbox.hasAttribute("breakout")
- ? transform
- : "";
+ //gNavToolbox.style.transform = transform;
+ //gURLBar.textbox.style.transform = gURLBar.textbox.hasAttribute("breakout")
+ // ? transform
+ // : "";
if (shiftSize > 0) {
// If the mouse tracking missed our fullScreenToggler, then the toolbox
// might not have been shown before the menubar is animated down. Make

View file

@ -11,7 +11,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
cumulativeDelta: 0,
direction: null,
};
_hoveringSidebar = false;
_lastScrollTime = 0;
bookmarkMenus = [
'PlacesToolbar',
@ -114,6 +113,10 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
window.addEventListener('AppCommand', HandleAppCommandEvent, true);
}
get _hoveringSidebar() {
return document.getElementById('navigator-toolbox').hasAttribute('zen-has-hover');
}
_handleAppCommand(event) {
if (!this.workspaceEnabled || !this._hoveringSidebar) {
return;
@ -138,14 +141,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
_setupSidebarHandlers() {
const toolbox = document.getElementById('navigator-toolbox');
toolbox.addEventListener('mouseenter', () => {
this._hoveringSidebar = true;
});
toolbox.addEventListener('mouseleave', () => {
this._hoveringSidebar = false;
});
const scrollCooldown = 200; // Milliseconds to wait before allowing another scroll
const scrollThreshold = 2; // Minimum scroll delta to trigger workspace change

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..251c3a7fa624057a8eaba5c0c42ef23fe2a6ace3 100644
index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..410aabf3a58d8d8df68098cbfb45729be3bead4a 100644
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
@ -157,3 +157,13 @@ index b953d7d2c8fa7fe2d320bd7cb7af9aeeef0abc86..251c3a7fa624057a8eaba5c0c42ef23f
}
child.removeAttribute("cui-anchorid");
child.removeAttribute("overflowedItem");
@@ -6678,6 +6678,9 @@ class OverflowableToolbar {
* @param {MouseEvent} aEvent the click event.
*/
#onClickDefaultListButton(aEvent) {
+ if (aEvent.view.gZenVerticalTabsManager._hasSetSingleToolbar && this.#toolbar.id == 'nav-bar') {
+ return;
+ }
if (this.#defaultListButton.open) {
this.#defaultListButton.open = false;
lazy.PanelMultiView.hidePopup(this.#defaultListPanel);