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.
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.
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?
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.
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).
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.
// @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
let el = document.getElementsByClassName('searchbox-wrapper');
let html = el.innerHTML;
el.innerHTML = html;