From c30ef4b74fc00b0011531e1ab17b0776ad19ea72 Mon Sep 17 00:00:00 2001 From: Brian Grinstead Date: Thu, 4 Oct 2018 22:59:01 +0000 Subject: [PATCH] Bug 1496478 - Only change the search engine when scrolling on searchbox if accel key is pressed;r=adw The Custom Element migration missed the [modifiers=accel] in XBL on the DOMMouseScroll handler. Differential Revision: https://phabricator.services.mozilla.com/D7780 --HG-- extra : moz-landing-system : lando --- browser/components/search/content/searchbar.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/browser/components/search/content/searchbar.js b/browser/components/search/content/searchbar.js index 3774f4cbeefd..b2e5150b0b2c 100644 --- a/browser/components/search/content/searchbar.js +++ b/browser/components/search/content/searchbar.js @@ -404,7 +404,11 @@ class MozSearchbar extends MozXULElement { this.select(); }); - this.addEventListener("DOMMouseScroll", (event) => { this.selectEngine(event, (event.detail > 0)); }, true); + this.addEventListener("DOMMouseScroll", (event) => { + if (event.getModifierState("Accel")) { + this.selectEngine(event, event.detail > 0); + } + }, true); this.addEventListener("input", (event) => { this.updateGoButtonVisibility(); });