[Suggestion] Brave Search searchbar `focusin` event causing issues on Firefox

Description of the issue:
On search.brave.com, if I try to click + hold + drag to select all of the text currently in the searchbar, the dropdown menu activates, and I am unable to select the text. This behavior is not consistent with most other search engines or text input elements on the web.

EDIT: Also see my post below: [Suggestion] Brave Search searchbar `focusin` event causing issues on Firefox - #6 by kebsworld

Video example (Brave):

Video example (Google):

Brave Version (check About Brave):
Firefox 112.0.2

Operating System:
Windows 10 and Linux Mint using the same version of Firefox

Are you not using Brave then? If not, could you share which web browser you’re using on this?

I can make a video if necessary, but I just checked on Brave Search using my Brave browser and I didn’t have this same issue. I was able to select everything like you showed in Video Example (Google).

Two different devices? Both with same issue? If so, both using same browser and setup, such as same extensions? Or you dual booting?

Hi, apologies for the lack of detail. I’ve updated my post.

This happens on two different devices; one running Windows 10, and another running Linux Mint (Ubuntu-based). I am using Firefox 112.0.2 on both devices without any extensions installed.

I’ve checked Brave Browser on both devices, and indeed, this is not an issue on Brave Browser; my guess is that this isn’t an issue on other Chromium-based browsers either.

1 Like

I just was researching a bit and found a similar topic in regards to Google from a few years back. The solution was to clear cookies for the site. Could you give that an attempt and advise if it resolves for you? I found that at https://support.mozilla.org/en-US/questions/1269271

Though I know that may not be it. But looking at web searches, it seems this has been an issue with Firefox for a while. So it may just be having to troubleshoot with them and discover what’s going on within the browser.

Thank you; although that linked issue about Google search results seems different than what I am experiencing on Firefox. On Firefox, it appears that I am able to select the text; however, it looks like the mousedown or click event is interrupting the drag selection somehow. I am not familiar with the internals of Brave Search, but this is my best guess. On the contrary, as I showed in my original post, doing this on Google Search works just fine.

I tried clearing cookies and also using private tabs; the issue persists on Firefox.

EDIT: Wondering also; are you able to replicate this in Firefox yourself?

After a little more investigation, the culprit seems to be the focusin event attached to the #searchbox input element. Disabling this event makes the search input behave more like that of Google Search’s.

EDIT: Updated video to be a little more clear


I just want to make it clear, that my above discovery of the focusin causing the issue in Firefox is not really a “solution” unless I do some userscript trickery. The change will have to be made by the front-end engineers working on Brave Search to make the search input work consistently across browsers.

Not sure if the engineering team reads sifts through this forum, but this may be useful for them to know.

@Mattches for this to be a Firefox only issue at this point, is it something to pass on to Search team or to be handled by Brave? Or would it mean that this is something that OP should be sharing with Firefox to have them make adjustments? Or the answer a little bit of both?

A couple things:

  1. It is not clear to me that this is a bug in Firefox or Chromium/Brave. I am not familiar enough with the focusin event and how it should be implemented at the browser engine level. The only thing clear to me is that there is a discrepancy between Firefox and Chromium/Brave.

  2. If it is indeed a Firefox bug and the Brave Search team chooses to not implement a workaround, I fear that the Firefox team will be slow as molasses to implement a fix (based on previous experiences watching tickets on Firefox Bugzilla). So Firefox users may continue to run into this weird quirk on search.brave.com for some time.

Thank you for the report. I’ll have to ask the Search team whether or not this is something that can be controlled on our end but I’m inclined to think yes, since it appears to be site specific (FYI I see this same behavior [in Firefox] on macOS and Windows systems).

Will reply back here when I hear back from them.


Any updates here @Mattches ? This issue persists on Firefox 114.0.1-2.

In case anyone else is reading this and annoyed by this issue, I’ve resorted to disabling the dropdown altogether with a Violentmonkey script. Because I cannot modify the focusin event, I am forced to destroy and recreate the input element altogether.

// ==UserScript==
// @name        Remove dropdown - brave.com
// @namespace   Violentmonkey Scripts
// @match       https://search.brave.com/search
// @grant       none
// @version     1.0
// @author      -
// @description 5/4/2023, 11:09:54 AM
// @run-at document-idle
// ==/UserScript==

let el = document.getElementsByClassName('searchbox-wrapper')[0];
let html = el.innerHTML;
el.innerHTML = html;

No updates but they’re quite busy — I’ll re-ping and see if I can get a response.

1 Like