When browser.newtab.url is changed, autofocus breakes

RESOLVED DUPLICATE of bug 766990

Status

()

Firefox
Untriaged
RESOLVED DUPLICATE of bug 766990
6 years ago
5 years ago

People

(Reporter: Lucas, Unassigned)

Tracking

15 Branch
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120629 Firefox/15.0a2
Build ID: 20120629042007

Steps to reproduce:

Changed browser.newtab.url to a local URL


Actual results:

URL bar is focused ("typeable")


Expected results:

Should have autofocused to a search field

Comment 1

6 years ago
I don't see a bug. 

If browser.newtab.url = about:newtab, then for each new tab, the focus is on the location bar, at the start because location bar is empty.

If browser.newtab.url = local URL (like file:///C:/...), then for each new tab, the focus in on the location bar, at the end.

Comment 2

6 years ago
(on Win 7, sorry)
(Reporter)

Comment 3

6 years ago
(In reply to Loic from comment #1)
> I don't see a bug. 
> 
> If browser.newtab.url = about:newtab, then for each new tab, the focus is on
> the location bar, at the start because location bar is empty.
> 
> If browser.newtab.url = local URL (like file:///C:/...), then for each new
> tab, the focus in on the location bar, at the end.

Just seems un-user-friendly, overriding the autofocus on the page. It's about 5 times faster to use a keyboard then a mouse for most things. That's why my new tab page has a search box. It's much quicker to cmd+T (Mac OS X) and search then cmd+T, move the mouse to the search box, click, then search.

Comment 4

6 years ago
I've got a solution for you. You need to set the autofocus property for your search field in your local file. Something like this:
<input autofocus="autofocus" />

Comment 5

6 years ago
Ok, so I don't see really a bug here.
In your case, your new tab page is user-customized so it's up to you to modify its code to get the correct behaviour as Kaixi Luo suggested.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → INVALID

Comment 6

5 years ago
Duplicate of bug 766990?

Comment 7

5 years ago
Better late than never. :D
Yes, you're right.
Resolution: INVALID → DUPLICATE
Duplicate of bug: 766990
You need to log in before you can comment on or make changes to this bug.