Can I keep Google from stealing my cursor in Firefox?

26
2013-07
  • Matt Leidholm

    I have iGoogle as my home page. Every time that I start up Firefox with the intent to go to a specific page, I end up typing half the URL in the Google search box when iGoogle steals focus away from the URL bar. Is there any way to hack Firefox (or iGoogle) to keep the page from stealing my cursor on load? Thanks!

  • Answers
  • RoyalKnight

    Similar to Bevan's answer, but a little different. Two options you have.

    In your Firefox options, Main tab, General section, set Firefox to start up with a blank page. Set your homepage, however to iGoogle. Whenever you open up Firefox, you'll be greeted by a blank page that doesn't steal your focus. If you want iGoogle, just click Home or hit Alt+Home.

    Alternatively, which may or may not be better or for you, is to set your homepage to be

    about:blank|http://www.google.com/ig

    This will essentially load a blank screen in the first tab for you to go anywhere you want while iGoogle loads in the background. Want to just go to iGoogle? CTRL+F4 to close the blank screen, or a CTRL+Tab to switch tabs. I take it there's a reason you have iGoogle as your home page, which is why I mentioned this alternative.

    Other than that, there's no Firefox option to prevent a page from taking focus; while there's a userscript called Focus Killer that says it'll prevent such behavior, my own tests indicate it only does this after the fact; i.e. iGoogle took focus away from the address bar, then a bit later Focus Killer took focus away from iGoogle. In the end, there was no focus on the address bar.

    Only other option would be to disable scripts from running, but I don't think you'd want that at all.

    An annoying problem, I feel your pain (they'd do this during Gmail sign on while I was typing my password, so that it'd mess up both fields and show a large portion of my password due to me not stopping in time). This is the best I can come up with.

  • 8088

    Don't need to change your homepage. Here's a trick:

    Find the Firefox prefs.js file according to your OS:

    For XP:

    C:\Documents and Settings\<user>\Application Data\Mozilla\Firefox\Profiles\<profile>\
    

    For Vista:

    C:\Users\<user>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile>\ 
    

    Below the comment area, directly above the existing directive lines, add the following 3 lines (swap yahoo.com with your offending page):

    user_pref("capability.policy.policynames", "nofocus");
    user_pref("capability.policy.nofocus.sites", "http://www.yahoo.com");
    user_pref("capability.policy.nofocus.HTMLInputElement.focus", "noAccess");
    

    If Firefox was open when you did this, it will overwrite your changes, so save it when Firefox is closed. Then reopen - good to go.

  • random

    One thing you could do is hit Esc before the rest of the page loads.

    This will stop it loading the rest of the page and by that, any JavaScript that will come along and start the focus of the browser on an input.

    Then carry on with Ctrl + L or F6 for the location or Ctrl + K if you wanted to use the search plugin.

    It's a temporary fix and you'll still be able to keep your default homepage without having to set it to about:blank.

  • Bevan

    Here's a workaround:

    Set your Firefox homepage to "blank" - then you can type a URL to your hearts content.

    Add the Google page to your links bar, so it's available just a click away.

    (Or, maybe not; you could just rely on the search built into Firefox)


  • Related Question

    google - Turn Firefox location bar into search box
  • cust0s

    I'd like to change the default behaviour of the location bar in firefox to search google unless I specifically enter a domain name.

    For example typing in Superuser will take me to the Google SERP but typing in Superuser.com will take me to the website.

    And I don't mean just changing the location bar from Google's 'feeling lucky' to a normal Google SERP


  • Related Answers
  • quickcel

    Something else to try is going to about:config and then changing the keyword.URL value.

    By default it is set to this:
    http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=

    Try changing it to this and see if it makes a difference:
    http://www.google.com/search?q=

  • Journeyman Geek

    kinda like the omnibar? Single search/url bar, which searches to a search engine of your choice unless its an exact url.

  • kpoehls

    I have Firefox 3.5.2 and this is the default behavior. I haven't set up any features or settings. Maybe you have an old version, prior to them adding the 'smart bar' feature.. try updating here http://www.mozilla.com/en-US/firefox/personal.html

  • Stack Apps

    For user who prefer to see a list of matching websites or search results instead of auto redirect to a web page when entering keywords in the Firefox’s link location bar, it’s possible to change the Firefox behavior by modifying its configuration using steps below.

    Enter about:config into the address bar.

    Locate keyword.url or type keyword.url into “Filter” text box to search for it.

    Double click on the line of “keyword.url”.

    By default, the string value for “keyword.url” is “about:neterror?e=query&u=”. To display search results instead, replace the string with one of the following search statements, depending on the search engine you prefer (e.g. Google: http://www.google.com/search?q=)

    Click OK when done.

    Source & more info