зеркало из https://github.com/mozilla/gecko-dev.git
Bug 879570 - Add mouse scroll support to start page r=mbrubeck
--HG-- extra : rebase_source : 7327481bec62faa7d106bab8685b30b317658fb6
This commit is contained in:
Родитель
7a603ed62c
Коммит
9a28e3f95d
|
@ -1409,6 +1409,7 @@ var StartUI = {
|
|||
Elements.startUI.addEventListener("autocompleteend", this, false);
|
||||
Elements.startUI.addEventListener("contextmenu", this, false);
|
||||
Elements.startUI.addEventListener("click", this, false);
|
||||
Elements.startUI.addEventListener("MozMousePixelScroll", this, false);
|
||||
|
||||
this.sections.forEach(function (sectionName) {
|
||||
let section = window[sectionName];
|
||||
|
@ -1512,6 +1513,16 @@ var StartUI = {
|
|||
case "click":
|
||||
this.onClick(aEvent);
|
||||
break;
|
||||
|
||||
case "MozMousePixelScroll":
|
||||
let startBox = document.getElementById("start-scrollbox");
|
||||
let [, scrollInterface] = ScrollUtils.getScrollboxFromElement(startBox);
|
||||
|
||||
scrollInterface.scrollBy(aEvent.detail, 0);
|
||||
|
||||
aEvent.preventDefault();
|
||||
aEvent.stopPropagation();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче