Refactor Zen browser settings and URL bar behavior for improved performance and interaction

This commit is contained in:
mr. M
2025-01-05 16:57:47 +01:00
parent a16040073f
commit 9aa0ac9396
2 changed files with 15 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
index 3ab07e5864b3bb200608e7f619645f92ade129fe..12fe08c48d5ca9f00253e0aa6ebbc867ff471c83 100644
index 3ab07e5864b3bb200608e7f619645f92ade129fe..0f9722f985abca2fdd4ea0265c020fc4228f2565 100644
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
@@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
@@ -22,10 +22,10 @@ index 3ab07e5864b3bb200608e7f619645f92ade129fe..12fe08c48d5ca9f00253e0aa6ebbc867
+ if (lazy.ZEN_URLBAR_BEHAVIOR == 'float' || (lazy.ZEN_URLBAR_BEHAVIOR == 'floating-on-type' && !this.focusedViaMousedown)) {
+ this.setAttribute("zen-floating-urlbar", "true");
+ this.classList.add("zen-floating-urlbar");
+ this.textbox.classList.add("zen-floating-urlbar");
+ } else {
+ this.removeAttribute("zen-floating-urlbar");
+ this.classList.remove("zen-floating-urlbar");
+ this.textbox.classList.remove("zen-floating-urlbar");
+ }
// Enable the animation only after the first extend call to ensure it
// doesn't run when opening a new window.