Bug 1575485 - Listen to legacy mouse scroll events on <tree> shadowRoot instead of the host element r=NeilDeakin

This allows scrolling to happen directly on the scrollbar element, which is inside the shadow DOM.

Differential Revision: https://phabricator.services.mozilla.com/D48755

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brian Grinstead 2019-10-15 14:16:23 +00:00
parent d093241f42
commit d49cb14c71

View File

@ -738,7 +738,8 @@
this._touchY = -1;
});
this.addEventListener("MozMousePixelScroll", event => {
// This event doesn't retarget, so listen on the shadow DOM directly
this.shadowRoot.addEventListener("MozMousePixelScroll", event => {
if (
!(
this.getAttribute("allowunderflowscroll") == "true" &&
@ -749,7 +750,8 @@
}
});
this.addEventListener("DOMMouseScroll", event => {
// This event doesn't retarget, so listen on the shadow DOM directly
this.shadowRoot.addEventListener("DOMMouseScroll", event => {
if (
!(
this.getAttribute("allowunderflowscroll") == "true" &&