-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes scroll lock detection in ShadowDOM #49
Conversation
d5b559e
to
24bc05e
Compare
I just sent a similar PR (see #50). This change alone does not fix it for me. The |
@@ -199,13 +199,13 @@ | |||
document.body.style.overflowY = 'hidden'; | |||
|
|||
// Modern `wheel` event for mouse wheel scrolling: | |||
window.addEventListener('wheel', this._scrollInteractionHandler, true); | |||
document.addEventListener('wheel', this._scrollInteractionHandler, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to update also the removeEventListener
code a few lines below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix.
043e44e
to
91419f4
Compare
Thanks. That is fine by me. |
childTwo = parent.querySelector('#ChildTwo'); | ||
grandChildOne = parent.querySelector('#GrandchildOne'); | ||
grandChildTwo = parent.querySelector('#GrandchildTwo'); | ||
childOne = Polymer.dom(parent.root).querySelector('#ChildOne'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this is just parent.$$.ChildOne
, which is less verbose, maybe? (here and below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix.
@cdata this is lgtm once you do those changes :) |
@cdata: The PR is LGTMed already. Can you provide a status update? |
Scroll locking was broken in ShadowDOM because `event.path` does not contain sufficient information when `currentTarget` is `window`. Listeners are now being added to `document` instead.
91419f4
to
e6cf173
Compare
Fixes scroll lock detection in ShadowDOM
Scroll locking was broken in ShadowDOM because
event.path
does notcontain sufficient information when
currentTarget
iswindow
.Listeners are now being added to
document
instead.