benbasson / newtabhomepage

Firefox Extension - Loads your homepage when you open a new tab.
http://www.basson.at/firefox-addons/newtabhomepage
Other
21 stars 6 forks source link

Feature request: Cursor in search field #2

Closed Mutaupi closed 6 years ago

Mutaupi commented 9 years ago

Hello Ben, Thanks for this add-on.I like that it allows me to go straight to my home page, uncluttered..

I note that it's possible to configure Firefox to do the same thing (the review of your add-in by 'GaryOB' on Jan 15 2015 gives the clue, although in my case I had to enter the home page's URL).

But for me, both your add-on and changing the configuration have the same 'problem'. They present the cursor initially in the address bar instead of in the search field. (The reviewer 'Wargum' raised this too, on Sep 15 2014).

Although the address bar also functions as a search field, some of us prefer to keep the the two functions separate.

Is there any chance your add-on could provide for the cursor in a new tab to be presented in the search field of the page, please - either as a feature or as an option?

(My home page is https://duckduckgo.com and my current Firefox version is 36.0 running under Windows 8.1)

mimamue commented 8 years ago

Do you still have this in mind? I'd desperately want the cursor placed in the search field (or the first text field of the new tab) instead of the URL bar, as well ... Thx so much in advance, Michael

vlakoff commented 8 years ago

Looks like it's the same as #4 and a few others.

I'm "fixing" the issue by installing addon version 0.4.3.1 then disabling automatic updates for this addon.

vlakoff commented 8 years ago

If this might be of inspiration, here is what the New Tab Control addon does:

    // focus empty new tab's content instead of its address bar
    if (SimplePrefs.prefs.focusNewTabContent && isEmptyNewTab) {
        let tabView = ViewCore.viewFor(tab);
        let browser = TabsUtils.getBrowserForTab(tabView);
        let browserView = ViewCore.viewFor(browser);
        setTimeout(browserView.focus.bind(browserView), 0);
    }
mimamue commented 8 years ago

ok, tried your hint with 0.4.3.1 and well, yes, it focusses to the text field, BUT ... it opens the new tab only in the back ground, I still have to switch manually to that new tab ... and I guess there's no real difference between having to switch to the tab or to the text field, is it?

although I really appreciate your help with that piece of code, I must confess that I'm not really deep into that kind of stuff ... that last line with that "focus" ... what is it doing? could that have something to do with the "missing" focus? i mean, when starting a new browser session, my start page in fact focuses the cursor into the first text field, just for the "new tab" this feature is missing ...

benbasson commented 7 years ago

Focus control has never been an explicit feature of this add-on, some users report that focus is always with the homepage instead of the location bar, others report focus with the location bar instead of the homepage.

It looks like with the add-on SDK there's actually a legitimate way to control this properly, so it's about time I got around to implementing it. At least we can have a year without this being a problem and then I guess we'll see where WebExtensions leaves add-on development by the end of 2017.

I'm going to close off all the other issues and just keep this one open until I do the work. Pull requests would also be welcome.

benbasson commented 6 years ago

Fixed by #19