diff --git a/src/browser/base/content/zen-styles/zen-compact-mode.css b/src/browser/base/content/zen-styles/zen-compact-mode.css index 4c4fa1053..0c95505d9 100644 --- a/src/browser/base/content/zen-styles/zen-compact-mode.css +++ b/src/browser/base/content/zen-styles/zen-compact-mode.css @@ -241,14 +241,16 @@ right 0.3s var(--zen-compact-mode-func); opacity: 1; - left: -1px; - :root[zen-right-side='true'] & { - right: -1px; - left: auto; - } + &:not([supress-primary-adjustment='true']) { + left: -1px; + :root[zen-right-side='true'] & { + right: -1px; + left: auto; + } - & #urlbar[open][zen-floating-urlbar='true'] { - --zen-urlbar-offset: 0px; + & #urlbar[open][zen-floating-urlbar='true'] { + --zen-urlbar-offset: 0px; + } } } } diff --git a/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch b/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch index 04b772f1d..6ead8d889 100644 --- a/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch +++ b/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs -index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a726c67e873 100644 +index 50968dc04b527438acf30151f0c2e92f8b45097c..f3539ff3a74474f2833800ae140b0384b21a7fb0 100644 --- a/browser/components/urlbar/UrlbarInput.sys.mjs +++ b/browser/components/urlbar/UrlbarInput.sys.mjs @@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter( @@ -16,7 +16,19 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72 const DEFAULT_FORM_HISTORY_NAME = "searchbar-history"; const SEARCH_BUTTON_CLASS = "urlbar-search-button"; -@@ -424,6 +431,10 @@ export class UrlbarInput { +@@ -348,7 +355,11 @@ export class UrlbarInput { + // See _on_select(). HTMLInputElement.select() dispatches a "select" + // event but does not set the primary selection. + this._suppressPrimaryAdjustment = true; ++ this.document.getElementById("navigator-toolbox").setAttribute("supress-primary-adjustment", true); + this.inputField.select(); ++ this.document.ownerGlobal.setTimeout(() => { ++ this.document.getElementById("navigator-toolbox").removeAttribute("supress-primary-adjustment"); ++ }, 0); + this._suppressPrimaryAdjustment = false; + } + +@@ -424,6 +435,10 @@ export class UrlbarInput { hideSearchTerms = false, isSameDocument = false ) { @@ -27,7 +39,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72 // We only need to update the searchModeUI on tab switch conditionally // as we only persist searchMode with ScotchBonnet enabled. if ( -@@ -1087,7 +1098,11 @@ export class UrlbarInput { +@@ -1087,7 +1102,11 @@ export class UrlbarInput { } if (!result.payload.providesSearchMode) { @@ -40,7 +52,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72 } this.controller.recordSelectedResult(event, result); -@@ -2144,6 +2159,11 @@ export class UrlbarInput { +@@ -2144,6 +2163,11 @@ export class UrlbarInput { this.setAttribute("breakout-extend", "true"); @@ -52,7 +64,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72 // Enable the animation only after the first extend call to ensure it // doesn't run when opening a new window. if (!this.hasAttribute("breakout-extend-animate")) { -@@ -2163,6 +2183,11 @@ export class UrlbarInput { +@@ -2163,6 +2187,11 @@ export class UrlbarInput { return; } @@ -64,7 +76,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72 this.removeAttribute("breakout-extend"); this.#updateTextboxPosition(); } -@@ -3305,7 +3330,7 @@ export class UrlbarInput { +@@ -3305,7 +3334,7 @@ export class UrlbarInput { } else { where = lazy.BrowserUtils.whereToOpenLink(event, false, false); } @@ -73,7 +85,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72 if (where == "current") { where = "tab"; } else if (where == "tab") { -@@ -3859,6 +3884,11 @@ export class UrlbarInput { +@@ -3859,6 +3888,11 @@ export class UrlbarInput { } _on_click(event) { @@ -85,7 +97,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72 if ( event.target == this.inputField || event.target == this._inputContainer || -@@ -3930,7 +3960,7 @@ export class UrlbarInput { +@@ -3930,7 +3964,7 @@ export class UrlbarInput { } } @@ -94,7 +106,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72 this.view.autoOpen({ event }); } else { if (this._untrimOnFocusAfterKeydown) { -@@ -3970,9 +4000,12 @@ export class UrlbarInput { +@@ -3970,9 +4004,12 @@ export class UrlbarInput { } _on_mousedown(event) { @@ -108,7 +120,7 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8e8e9c06613c5d5f33333fd9e128a72 if ( event.target != this.inputField && -@@ -3982,8 +4015,8 @@ export class UrlbarInput { +@@ -3982,8 +4019,8 @@ export class UrlbarInput { break; }