# Autocomplete disabled in Mac Firefox



## ra4ul

I see that word completion is disabled specifically in Firefox on OS X through the following code:

var WRautocomplete=function(){if(-1==navigator.userAgent.search(/OS X.*Firefox/gi))

I'm wondering if this is outdated, since I've been using it without issue (by spoofing the user agent) for some time now and see no difference when using other browsers / systems.  I found this old thread that may explain why Firefox / Mac was singled out in the first place, but it seems to be working consistently now.


----------



## nutmeg

In the past couple of days I noticed that word completion has started again on Firefox on OS X.  Is there a way to turn it off?

Thanks.


----------



## ra4ul

Mike changed the code to check for OS X.*Firefox1234, so you can turn it off if you spoof your user agent on wordreference.com as Firefox1234.

Enter about:config in the URL, Right-click > New > String and enter general.useragent.override.wordreference.com as the preference name.  Then for the value enter something like Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:23.0) Gecko/20100101 Firefox1234/23.0


----------



## nutmeg

Thanks!  That worked.


----------



## mkellogg

I have started getting complaints from people about this.  The problem is that some people, at least, have to hit Enter twice to submit a query when autocomplete functionality is turned on for Mac Firefox.  Does this happen to all of you?  Basically, you type a word without using the autocomplete function, and you end up having to hit Enter twice.


----------



## nutmeg

Yes, that's true.  When auto-complete is on I have to hit Enter twice: the first Enter dismisses the auto-complete menu, and the second one starts the search. 

And turning off auto-complete has the undesirable effect of removing the search button with the magnifying glass.

I can send you screenshots if you want.


----------



## ra4ul

Sorry I didn't notice this before, but this also happens to me on Mac Firefox (and should for everyone due to the way it handles dropdowns internally).  However this should be easy to fix with a keydown event listener on the relevant input:


document.getElementById("si").addEventListener("keydown", code, false);
function code(e) {if (e.keyCode == 13) // maybe also check for Mac Firefoxdocument.getElementById("text_form").submit();​}


I just tested it and it worked, though it'll obviously require more rigorous testing.


----------



## mylojr

Autocomplete is not working for me and I would like to have it. It is really helpful when I am looking for a Spanish word that I don't know the exact spelling for.
Can it be turned on?

I have Firefox 22.0 with Mac OX 10.8.5 running on a Macbook Pro. Thanks.


----------



## ra4ul

Follow the instructions I posted in comment #3 (see above).  When you enter a new value for the preference change "OS X" to "SO X", or something similar.


----------



## mkellogg

I see that I never wrote in this thread that I had to revert it due to  the complaints about having to hit Enter twice.  I'm afraid that I don't  have a solution.  I was working on one in October, but it didn't work  in the end.

I've got another idea. I'll see what I can do in the next few weeks.


----------

