mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
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:
parent
d093241f42
commit
d49cb14c71
@ -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" &&
|
||||
|
Loading…
Reference in New Issue
Block a user