firefox-omni-tweaks icon indicating copy to clipboard operation
firefox-omni-tweaks copied to clipboard

Add an option to disable changing search engines by scrolling on the search bar

Open the-blank-x opened this issue 2 years ago • 0 comments

From a feature request I filed:

It seems like you can change your default search engine by scrolling on the search bar (in my experience, this has only worked if I pinch/zoom on the bar). I tend to magnify pages with small text by pinching to zoom on my touchpad. If the cursor happens to be on the search bar, I would accidentally change my search engine and have to go to settings to change it back to my preferred engine. It doesn't seem like I can disable this functionality, hence this feature request/idea.

Looks like this functionality is in browser/omni.ja, more specifically chrome/browser/content/browser/search/searchbar.js:

this.addEventListener(
  "DOMMouseScroll",
  event => {
    if (event.getModifierState("Accel")) {
      this.selectEngine(event, event.detail > 0);
    }
  },
  true
);

It also seems like this happens when you scroll while holding Control (source)

the-blank-x avatar Aug 19 '23 06:08 the-blank-x