The default bug view has changed. See this FAQ.

Add pref to change number of rows shown at one time in locationbar autocomplete popup

NEW
Assigned to

Status

()

Firefox
Location Bar
P5
enhancement
9 years ago
20 days ago

People

(Reporter: nightstalkerz, Assigned: Alan Thomas)

Tracking

unspecified
Future
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1a1pre) Gecko/2008061803 Minefield/3.1a1pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1a1pre) Gecko/2008061803 Minefield/3.1a1pre

Currently Firefox 3 only shows 6 results when searching from the location bar. This may not be enough if some of us have larger monitors so it would be nice to have a value in the about:config which lets the user change it.

Reproducible: Always

Steps to Reproduce:
1. Type something in the locationbar
2.
3.
Actual Results:  
Results returned are 6 rows before having to scroll.

Expected Results:  
Results returned are defaulted to 6 rows unless the user changes it.

The addon above contains code to do this and shouldn't take very long to intergrate.

Comment 1

9 years ago
browser.urlbar.maxRichResults
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 2

9 years ago
That changes the number of results which are returned. The thing I'm talking about is the autopopup when the user searches. It cannot be changed through the about:config.

Comment 3

9 years ago
Ah, the size of the popup and not the number of results in it.

Valid request.  I agree, this shouldn't be hardcoded.

See bug 406257 and bug 389584.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---

Updated

9 years ago
Severity: minor → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows Vista → All
Hardware: PC → All

Updated

9 years ago
Summary: Allow user to change number of search rows from locationbar → Add pref to change number of rows shown at one time in locationbar autocomplete popup

Updated

8 years ago
Priority: -- → P5
Target Milestone: --- → Future

Comment 4

8 years ago
A valid workaround is Locationbar Limit ==> https://addons.mozilla.org/en-US/firefox/addon/7674

However I would prefer an user_pref in about:config instead of using an extension.
(Assignee)

Updated

6 years ago
Duplicate of this bug: 613881
(Assignee)

Comment 6

6 years ago
Created attachment 497126 [details] [diff] [review]
patch to add pref browser.urlbar.dropdownSize

Here is a patch which seems to work. It reads from the pref "browser.urlbar.dropdownSize", which is by default 6 (the current, hard-coded setting). The patch also fixes some busted indentation.

I'm not sure if the implementation is quite right - it does require a browser restart for any change to take effect.

Who can review for this component?
Assignee: nobody → at.light
Attachment #497126 - Flags: feedback?
(Assignee)

Comment 7

6 years ago
Created attachment 504216 [details] [diff] [review]
patch

Un-bitrotting.
Attachment #497126 - Attachment is obsolete: true
Attachment #504216 - Flags: review?
Attachment #497126 - Flags: feedback?
(Assignee)

Updated

6 years ago
Attachment #504216 - Flags: review? → review?(dao)
Comment on attachment 504216 [details] [diff] [review]
patch

>           if (searchBar && searchBar.textbox == this.mInput) {
>-            // Handle search bar popup clicks
>-            var search = controller.getValueAt(this.selectedIndex);
>+          // Handle search bar popup clicks
>+          var search = controller.getValueAt(this.selectedIndex);

hm?
Attachment #504216 - Flags: review?(dao) → review-
(Assignee)

Comment 9

6 years ago
Created attachment 504233 [details] [diff] [review]
patch

Sorry about that.
Attachment #504216 - Attachment is obsolete: true
Attachment #504233 - Flags: review?(dao)
Comment on attachment 504233 [details] [diff] [review]
patch

There's maxrows="6" in browser.xul which this patch seems to make obsolete.

>@@ -957,16 +958,30 @@
>                           .getService(Components.interfaces.nsIPrefBranch);
>               this._maxResults = prefService.getIntPref("browser.urlbar.maxRichResults");
>             }
>             return this._maxResults;
>           ]]>
>         </getter>
>       </property>
> 
>+      <property name="maxRows">
>+        <getter>
>+          <![CDATA[
>+            if (!this._maxRows) {
>+              var prefService =
>+                Components.classes["@mozilla.org/preferences-service;1"]
>+                          .getService(Components.interfaces.nsIPrefBranch);
>+              this._maxResults = prefService.getIntPref("browser.urlbar.dropdownSize");

This should be using Services.prefs.
Attachment #504233 - Flags: review?(dao) → review-

Comment 11

20 days ago
I confirm that https://addons.mozilla.org/en-US/firefox/addon/locationbar-limit/ is a workaround. 

It gives two options
> Results searched: N
> Rows visible: M

I don't understand the meaning of the first one "Results searched".
You need to log in before you can comment on or make changes to this bug.