Scroll Anchoring: unwarranted mitigation on blitzortung.org |
||||||||
Issue description<b>Version: <Kenneth, what is the frequency?></b> <b>OS: <please tell me it's not XP></b> What steps will reproduce the problem? (1) goto http://en.blitzortung.org/live_dynamic_maps.php?map=15 (2) zoom the page if needed to allow for scrolling (3) scroll a bit (4) then try to pan the map What is the expected output? The map pans as intended. What do you see instead? Scroll anchoring is interfering. Video: https://www.youtube.com/watch?v=0HaL0QDWNxA&feature=youtu.be Description from the video: "on 1080p screen you need to zoom the page (150% works) so you have place to scroll. I need to actuate my mouse scroll 2 at least times (don't know why) to make this bug appear. Then when you use your mouse to move the map the page starts to move. chrome://version Google Chrome 54.0.2794.0 (Official Build) canary (64-bit) Revision 02e8e6a146a2a17dcd8950b783130d5937ce87dd-refs/heads/master@{#404734} OS Windows"
,
Jul 14 2016
Tested the same on win8.1 chrome version 54.0.2796.2 on zooming 150% and scrolling twice tried to pan the map with mouse - observed that there is no page scrolling observed Please find the screencast Could you please let us know if this is still reproducible. If yes please mention the chrome version details
,
Jul 14 2016
,
Jul 18 2016
,
Jul 19 2016
It looks like we're anchoring to something inside the map and that changes when we try to pan, resulting in an incorrect adjustment. Discussing potential solutions with skobes but we probably need a way to disable scroll anchoring when a layout is caused by a user-gesture.
,
Jul 19 2016
,
Jul 19 2016
Rough ideas: - somehow disable anchoring during a user's drag gesture, without also disabling it during native touch scrolls - make findAnchor skip elements whose transform has recently(?) been updated - don't pick anchors inside transformed elements at all (big hammer)
,
Jul 19 2016
Sami, does the renderer scheduler currently know when we're doing a drag gesture?
,
Jul 19 2016
I think all of these proposals would break scroll anchoring for some subset of JS scrollers, wouldn't they? That's probably okay, but we'd want to be aware we're doing it.
,
Jul 19 2016
Disabling for script-handled drag gestures would mean we don't get anchoring while the JS scroller is being scrolled (but it would still get anchoring when the user is not scrolling it). Disabling for transforms would disable scroll anchoring for JS scrollers that use transforms, but not for those that simply change the scroll offset programmatically.
,
Jul 19 2016
I think it may be tricky to find a heuristic to classify script-handled drag gestures for which we want to disable scroll anchoring. For non-touch, it may suffice to query the active button state which tells us whether a user is clicking/interacting with the page. For touch, we need to know whether the script prevent defaults while the user is interacting with the page. This is tricky because we need to find a way to cache this information and a single mousemove event (peventing defalt) doesn't correspond to the layout where we are making a decision of whether or not to apply scroll anchoring.
,
Jul 20 2016
Per today's meeting the plan is to keep track of whether the user is doing a "non-scrolling drag". On desktop, this is when the mouse button is down; on mobile, we will enter this state when a touchmove is preventDefault'ed, and exit on touchend. We will suppress scroll anchoring for layouts that occur during this state, and for the first layout following the exit. This increases the number of web compat hacks we are adding to the scroll anchoring algorithm, which is concerning. A path to reducing these in the long term is: 1. Add an API to exclude portions of the DOM from anchor selection, possibly reusing overflow-anchor. 2. Evangelize the use of this API and/or the opt-out to reduce websites' reliance on the hacks we have added. 3. Remove the hacks (non-scrolling drag suppression, bounce suppression, total adjustment limit, position:absolute exclusions).
,
Jul 20 2016
,
Jul 25 2016
I wonder if any of the use cases the Blink scheduler detects would be useful here: https://cs.chromium.org/chromium/src/components/scheduler/renderer/renderer_scheduler_impl.h?rcl=0&l=47
,
Aug 5 2016
,
Sep 6 2016
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by kenjibaheux@chromium.org
, Jul 14 2016