How to Fix the Find-As-You-Type Bug in Firefox

Filed under “Software
by Adam at 12:36 PM

Permalink :: 96 Comments

Not long after upgrading to Firefox 1.5, I noticed a really annoying problem — I couldn’t type a forward-slash character (“/”) into a form field without invoking the browser’s Find dialog. Since I type a fair bit of HTML into browser forms, this was a big problem. Update: Some people are still experiencing this bug in Firefox 2.0, and I’ve received comments indicating that the fixes in this post still work in 2.0. Your mileage, of course, may vary.

A little googling around showed that I’m not the only one to notice this bug, so I thought I’d post my solution here.

The fix in four steps:

  1. Type about:config into the Firefox address bar and hit the Enter key (or press the “Go” button). This will take you to a special advanced configuration screen.
  2. Your cursor should already be blinking happily in the “Filter” text box. If not, click in that text box and type “typeahead” to narrow the options down to only those relating to the Find-As-You-Type feature.
  3. Check the line that begins with accessibility.typeaheadfind.autostart. This controls whether the browser will start searching text on a web page as soon as you begin typing, without having to first invoke the “Find” dialog by pressing Control–F or typing a forward-slash. I had disabled this feature in the Firefox options, but for some reason this value was set to “true.”
  4. If accessibility.typeaheadfind.autostart has a value of “true” on your machine and you’re experiencing the same bug I was, try double-clicking that row in the about:config interface. This will set it’s value to “false,” which solved the problem for me.

If you try this on your own computer, please let me know if it works. I’ll submit it to Bugzilla if I can get confirmation that this wasn’t just a quirk with my installation.

Updates

  • 5/14/2006 @ 7:34 PM — A reader going by Kaph found out that the find-as-you-type bug was being caused on his computer by a file called user.js (more info). Since the about:config interface only alters the prefs.js file, the fix I suggested in this post didn’t work for him. Advanced users may want to try examining and editing user.js if they can’t restore the correct find behavior by using about:config. Be sure to back up the file before you make any changes, of course.

    If you aren’t comfortable editing JavaScript files, the first thing you should do is confirm that user.js is the source of the problem. Move the file out of your profile folder, restart Firefox if it’s currently open, then apply the fix I described above. Now restart Firefox once again to see if the fix “takes” this time. If so, then settings in your user.js file are over-riding your prefs.js file. Describe the situation to a technically-minded friend, and ask if they can help you out by altering the user.js file for you.

  • 1/27/2007 @ 5:10 PM — A commenter named Winter has determined that this bug can sometimes show up because of a conflict between the HTML Validator extension for Firefox and recent beta releases of the Firebug extension. If you’re experiencing this bug and have both of those extensions enabled, try disabling one or both of the extensions to fix the problem.

    This issue may go away as Firebug leaves beta and reaches version 1.0. It’s also worth noting that other in-browser validators, such as that offered by the Web Developer extension, don’t have this conflict. Web Developer doesn’t offer the same “instant” validation feedback, but validation-on-demand is good enough for most people.

  • 5/1/2007 @ 12:30 AM — Mike Youell reported that the ClipMarks extension was causing this problem for him. Uninstalling the extension fixed the bug in his case.

Derek Powazek Does Not Hate Christmas

Filed under “Culture,” “Humor,” “Spirituality & Philosophy,” and “Politics
by Adam at 12:07 PM

Permalink :: 1 Comment

Nope, not at all.

An interesting perspective on the alleged War on Christmas, from a Jew living in this “Christian nation” of ours.

The Feminine Wiles of innerHTML

Filed under “Web Design & Development” and “Sex & Gender
by Adam at 11:47 PM

Permalink :: 1 Comment

Jeremy Keith has been keeping a promotional weblog for his (by all accounts excellent) new book DOM Scripting: Web Design with JavaScript and the Document Object Model. Earlier this month he posted on something that’s been bugging a lot of developers who try to grapple with that newfangled beast known as AJAX — whether it’s acceptable to use innerHTML as a less-semantic, less-abstracted, non-DOM method for plugging the results of a JavaScript remote data call into a web page.

innerHTML as dangerously sexy seductress
innerHTML — even the name sounds a little dirty (photo by Nara Osga, via Stock.xchng)

Both sides of the debate argue passionately in the comments on Jeremy’s post, and they both make good points. It was in the midst of all this rhetorical jousting that Jonathan Snook dropped a real gem:

I think innerHTML is sexy. It’s so easy as to be sleazy.

Oh, great. Now innerHTML will be forever personified in my mind as a smirking, raven-haired seductress in a dress cut down to here and slit up to there, throwing herself at me despite my best efforts to walk the straight and narrow of semantically correct code. How shall I ever resist her wanton advances??

… I think I may need to get out more.

Ahem. Anyway, the debate breaks down like this: Critics say that using innerHTML is sloppy and evil, courting everything from semantically invalid markup to the downfall of the free world. Pragmatists, in turn, note that it may be sloppy but it’s a hell of a lot faster to slap some generic HTML into a page element with one line of code using innerHTML than to write twenty lines of createElement / createTextNode / appendChild nonsense to do the same thing with “correct” DOM methods. As Jeremy notes, there’s even a new microformat dubbed AHAH to make the use of innerHTML even easier. The real punchline here is that XMLHttpRequest isn’t part of the DOM either, and innerHTML actually enjoys better browser support.

My take is this: Neither method is perfect, and these technologies simply aren’t mature enough yet to claim that anything is truly the “standard” for getting the job done. If you’re dealing with XML as a back-end data store, handling business logic or order processing rather than simple page updates, or already using XSLT then the DOM methodology may very well be a safer bet. If not, then go ahead and save yourself some time and trouble with innerHTML. I’m just barely getting my toes wet with this stuff and could be way off base, but that’s the way I see it.

Updates:

  • 12/19/2005 @ 12:17 AM — For some informative reviews of DOM Scripting, check this Google search. It leaves out the major book sellers’ web sites, the promotional blog, and the author’s personal web site. Among what remains, the top hits mainly seem to be reviews by web developers, posted to their own blogs and journals.
  • 12/19/2005 @ 11:58 AM — Microformats.org has some more info on AHAH and how it compares to traditional AJAX.

OneLook Reverse Dictionary

Filed under “Web Links” and “Writing
by Adam at 7:43 PM

Permalink :: 1 Comment

I don’t remember what link I followed to this little buried treasure, but I’m thrilled to have found it. The OneLook Reverse Dictionary is at least a dozen times more useful than a book of synonyms thesaurus, and faster to boot.

Most of the times I find myself reaching for a thesaurus, it’s not to find a word that means the same thing as another word. Instead, I tend to use them to find the word for a certain thing or concept by looking up related words and hoping for a match. Thesauri aren’t very well suited to such a task, which is where OneLook’s tool comes in very handy. It also offers some useful features for crossword puzzle junkies.

Updates

Structured Blogging

Filed under “Blogging,” “Web Links,” and “Web Design & Development
by Adam at 6:37 AM

Permalink :: Make a Comment

“Structured Blogging” is a content mark-up methodology that uses XHTML microformats and RDF to impart more machine-readable meaning to your blog posts. This means that they can be aggregated and searched in new and interesting ways, as described on the effort’s benefits and about pages. Better still, the classes added to markup created to Structured Blogging specifications provide great hooks for adding a new level of presentational richness to a weblog.

Getting started with Structured Blogging seems easy enough. Blogware plugins to automate the creation of SB content are available at the Structured Blogging web site. The plugins are in beta testing for now. With PubSub and others lining up behind the effort, however, development will hopefully progress quickly.

(Props: Oliver Thylmann — Thoughts)

Updates