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
This commit is contained in:
Brian Grinstead 2018-10-04 22:59:01 +00:00
Родитель 7264558d5d
Коммит c30ef4b74f
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -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(); });