Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More
Solved Archived

How can I make Firefox jump to a search field by HTML-ID?

Philipp1107 replied
Philipp1107

I've got a simple question (at least I hope so):

In HTML you can jump to an item (usually heading) by id (domain.name#heading). Today we tried utilizing this feature in our office to create a short link which allows you to immediatly access a searchbar on our CRM Webapp. In our office we all use Chrome, but my browser of choice is Firefox. Now I'm kind of disappointed Firefox seems like it doesn't support this feature.

To demonstrate what I mean: Lets say this is my Website: https://www.archlinux.org#pkgsearch-field

When I open this link in Chrome I'm able to immediately search for a package but when I open it in Firefox, nothing happens. Also, as soon as I reload my page in Chrome it won't work, but I can open it in a new tab and it works again.


Do you have any idea why this happens? Is it an extra feature Firefox doesn't support? Can I get it to work in Firefox (I really hope so)? I'm looking forward to hear from you.

Kind regards yours Philipp

I've got a simple question (at least I hope so): In HTML you can jump to an item (usually heading) by id (domain.name#heading). Today we tried utilizing this feature in our office to create a short link which allows you to immediatly access a searchbar on our CRM Webapp. In our office we all use Chrome, but my browser of choice is Firefox. Now I'm kind of disappointed Firefox seems like it doesn't support this feature. To demonstrate what I mean: Lets say this is my Website: https://www.archlinux.org#pkgsearch-field When I open this link in Chrome I'm able to immediately search for a package but when I open it in Firefox, nothing happens. Also, as soon as I reload my page in Chrome it won't work, but I can open it in a new tab and it works again. Do you have any idea why this happens? Is it an extra feature Firefox doesn't support? Can I get it to work in Firefox (I really hope so)? I'm looking forward to hear from you. Kind regards yours Philipp

All Replies (2)

Chosen Solution

Hi Philipp, Firefox uses the "hash" at the end of a URL to scroll a particular element in the page into view, and also lets scripts react to it. However, Firefox doesn't automatically do a second level check whether the hash is the id of a form field that the user might want the cursor inserted into. That seems to be an extra feature of Chrome.

Someone filed a request to add this to Firefox in August, and it was assigned priority P2, which is not bad for a feature enhancement, but I don't see anyone working on it so far:

Bug 1484185 -- please don't add comments unless you plan to work on the code. See:

I think it's possible to write an add-on that injects this functionality into your site now if you like. It could either change the page to autofocus the search bar every time you load it, like the Google home page, or only when you use a particular hash on the URL.

Thank you very much for this detailed answer :D