mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-07 02:16:36 +00:00
fix: Fixed urlbar in double toolbar mode, b=(bug #7385), c=common
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
|
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||||
index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8d94bc2b7f3469258cb1a24888c5890eb83047e1 100644
|
index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..66ef8de0d2a767376740ca57d75b5372cc11ed40 100644
|
||||||
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
|
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||||
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
|
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||||
@@ -68,6 +68,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
@@ -68,6 +68,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||||
@@ -208,7 +208,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8d94bc2b7f3469258cb1a24888c5890e
|
|||||||
this.view.autoOpen({ event });
|
this.view.autoOpen({ event });
|
||||||
} else {
|
} else {
|
||||||
if (this._untrimOnFocusAfterKeydown) {
|
if (this._untrimOnFocusAfterKeydown) {
|
||||||
@@ -4164,9 +4237,12 @@ export class UrlbarInput {
|
@@ -4164,9 +4237,16 @@ export class UrlbarInput {
|
||||||
}
|
}
|
||||||
|
|
||||||
_on_mousedown(event) {
|
_on_mousedown(event) {
|
||||||
@@ -216,24 +216,28 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8d94bc2b7f3469258cb1a24888c5890e
|
|||||||
+ switch (event.zenOriginalTarget || event.currentTarget) {
|
+ switch (event.zenOriginalTarget || event.currentTarget) {
|
||||||
case this.textbox: {
|
case this.textbox: {
|
||||||
this._mousedownOnUrlbarDescendant = true;
|
this._mousedownOnUrlbarDescendant = true;
|
||||||
+ if (event.type != "click") {
|
+ const isProbablyFloating =
|
||||||
|
+ (lazy.ZEN_URLBAR_BEHAVIOR == "floating-on-type" &&
|
||||||
|
+ this.hasAttribute("breakout-extend") && !this.focusedViaMousedown) ||
|
||||||
|
+ (lazy.ZEN_URLBAR_BEHAVIOR == "float") || this.window.gZenVerticalTabsManager._hasSetSingleToolbar;
|
||||||
|
+ if (event.type != "click" && isProbablyFloating || event.type == "click" && !isProbablyFloating) {
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
if (
|
if (
|
||||||
event.target != this.inputField &&
|
event.target != this.inputField &&
|
||||||
@@ -4176,8 +4252,8 @@ export class UrlbarInput {
|
@@ -4178,6 +4258,10 @@ export class UrlbarInput {
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
- this.focusedViaMousedown = !this.focused;
|
this.focusedViaMousedown = !this.focused;
|
||||||
- this._preventClickSelectsAll = this.focused;
|
this._preventClickSelectsAll = this.focused;
|
||||||
+ this.focusedViaMousedown = !(lazy.ZEN_URLBAR_BEHAVIOR === 'default' ? this.focused : this.hasAttribute("breakout-extend"));
|
+ if (isProbablyFloating) {
|
||||||
+ this._preventClickSelectsAll = lazy.ZEN_URLBAR_BEHAVIOR === 'default' ? this.focused : this.hasAttribute("breakout-extend");
|
+ this.focusedViaMousedown = !this.hasAttribute("breakout-extend");
|
||||||
|
+ this._preventClickSelectsAll = this.hasAttribute("breakout-extend");
|
||||||
|
+ }
|
||||||
|
|
||||||
// Keep the focus status, since the attribute may be changed
|
// Keep the focus status, since the attribute may be changed
|
||||||
// upon calling this.focus().
|
// upon calling this.focus().
|
||||||
@@ -4218,7 +4294,7 @@ export class UrlbarInput {
|
@@ -4218,7 +4302,7 @@ export class UrlbarInput {
|
||||||
}
|
}
|
||||||
// Don't close the view when clicking on a tab; we may want to keep the
|
// Don't close the view when clicking on a tab; we may want to keep the
|
||||||
// view open on tab switch, and the TabSelect event arrived earlier.
|
// view open on tab switch, and the TabSelect event arrived earlier.
|
||||||
|
@@ -1097,7 +1097,7 @@ menuitem[id='placesContext_new:separator'] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#alltabs-button {
|
#alltabs-button {
|
||||||
list-style-image: url("chrome://browser/skin/tabs.svg") !important;
|
list-style-image: url('chrome://browser/skin/tabs.svg') !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
:not(:not(menubar) > menu, #ContentSelectDropdown)
|
:not(:not(menubar) > menu, #ContentSelectDropdown)
|
||||||
|
@@ -95,12 +95,18 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
:root[zen-single-toolbar='true'] #urlbar:not([breakout-extend='true']) #identity-box {
|
:root[zen-single-toolbar='true'] #urlbar:not([breakout-extend='true']) {
|
||||||
|
& #urlbar-input {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
& #identity-box {
|
||||||
margin-inline-end: 0 !important;
|
margin-inline-end: 0 !important;
|
||||||
&.chromeUI:not([pageproxystate='invalid']) #identity-icon-box {
|
&.chromeUI:not([pageproxystate='invalid']) #identity-icon-box {
|
||||||
border-radius: 10px !important;
|
border-radius: 10px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.urlbar-page-action,
|
.urlbar-page-action,
|
||||||
#tracking-protection-icon-container {
|
#tracking-protection-icon-container {
|
||||||
|
Reference in New Issue
Block a user