-
Notifications
You must be signed in to change notification settings - Fork 50
keep overflow, prevent events that cause scrolling #93
Conversation
243fd1b
to
25d947f
Compare
@@ -57,7 +64,7 @@ | |||
|
|||
scrollLocked = !!currentLockingElement && | |||
currentLockingElement !== element && | |||
!this._composedTreeContains(currentLockingElement, element); | |||
!Polymer.dom(currentLockingElement).deepContains(element); |
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.
Does this check the composed tree as well? 🌴
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.
Actually, let me revert this part as it has nothing to do with the fix ;)
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.
Done!
982afbf
to
0080469
Compare
…not be interrupted
Testing on nexus 6p and pixel c; CPU usage while scrolling on unscrollable section is very low. Two cores used, and mostly less than half. No frame drops; all idle frames!! Slower when scrolling in a scrollable section. CPU usage seems to be relatively high, but no higher than the animation of opening the dropdown. No frame drops except when flinging, but that happens on the main page too with no open dropdowns (damn android). I think that the memoization is a success. |
LGTM |
fixes #91 |
(started in #64, which was reverted because it introduced a breaking change)
Fixes #54 , fixes #43.
For #54, the goal is to keep the overflow on
document.body
, and prevent the scrolling from happening if:For #43, the
scroll
event listener on document will restore scrolling if it happens because of a user text selection or if the user scrolls through the side scroll bars. IfallowScrollOutside
, it will callrefit
.I've profiled the performance of the change using this file https://gist.github.com/valdrinkoshi/5fb1c67fddd31782508b9e39c8ac25a3, and I'm seeing that overall fps is around 60fps, except some longer frames which go down to 25-30fps, and I believe it is mainly because of the
touchmove
listener which interrupts the scrolling to execute the javascript (in the timeline I see only the Painting and Rendering activities during this longer frames).Interactions:
Longer frame example: