mirror of
https://github.com/zen-browser/desktop.git
synced 2026-09-02 19:53:34 +00:00
43 lines
1.8 KiB
C++
43 lines
1.8 KiB
C++
diff --git a/browser/components/urlbar/UrlbarView.sys.mjs b/browser/components/urlbar/UrlbarView.sys.mjs
|
|
index b665adb1a1ce8bbae8df4cbea6c3248c3e4fb431..1de7f9461b8ccbd4680b917e6dd5ba3c02f69a94 100644
|
|
--- a/browser/components/urlbar/UrlbarView.sys.mjs
|
|
+++ b/browser/components/urlbar/UrlbarView.sys.mjs
|
|
@@ -640,7 +640,7 @@ export class UrlbarView {
|
|
!this.input.value ||
|
|
this.input.getAttribute("pageproxystate") == "valid"
|
|
) {
|
|
- if (!this.isOpen && ["mousedown", "command"].includes(event.type)) {
|
|
+ if (!this.isOpen && ["mousedown", "click", "command"].includes(event.type)) {
|
|
// Try to reuse the cached top-sites context. If it's not cached, then
|
|
// there will be a gap of time between when the input is focused and
|
|
// when the view opens that can be perceived as flicker.
|
|
@@ -777,10 +777,6 @@ export class UrlbarView {
|
|
}
|
|
|
|
// If search mode isn't active, close the view.
|
|
- if (!this.input.searchMode) {
|
|
- this.close();
|
|
- return;
|
|
- }
|
|
|
|
// Search mode is active. If the one-offs should be shown, make sure they
|
|
// are enabled and show the view.
|
|
@@ -2988,6 +2984,8 @@ export class UrlbarView {
|
|
if (row?.hasAttribute("row-selectable")) {
|
|
row?.toggleAttribute("selected", true);
|
|
}
|
|
+ // only scroll if its not already fully visible
|
|
+ element.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
if (element != row) {
|
|
row?.toggleAttribute("descendant-selected", true);
|
|
}
|
|
@@ -3477,7 +3475,7 @@ export class UrlbarView {
|
|
}
|
|
|
|
#enableOrDisableRowWrap() {
|
|
- let wrap = getBoundsWithoutFlushing(this.input).width < 650;
|
|
+ let wrap = false;
|
|
this.#rows.toggleAttribute("wrap", wrap);
|
|
this.oneOffSearchButtons?.container.toggleAttribute("wrap", wrap);
|
|
}
|