-
Notifications
You must be signed in to change notification settings - Fork 34
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
touch-action and scrolling directional lock #303
Comments
Yes. Chrome does do the direction locking for touch scrolling. It is called railing. However, it only holds it if the user doesn't move a substantial amount in other directions. If they do then railing breaks. Here is an example. If you start scrolling horizontally if the finger moves slightly vertically we don't do vertical scroll. But if you move the finger enough in the vertical direction then it starts scrolling in that direction as well. The railing logic has nothing to do with touch-action values though.
As far as I recall there was no specification around the railing logic that Chrome does. However, it is not quite locking either. It is more of a user experience as users are still allowed to scroll in other directions with just a little more movement in the other directions to start it. It is more of a UA behavior to account for the touch sensitivity of screens. Since it is not exactly locking the scroll do you still think a spec is valuable in this space? Also as I mentioned the railing behavior has nothing to do with touch-action. Note that there is another concept called scroll latching. Sometimes the vertical scroller is the document scroller for example and horizontal scroller is some inner scroller. In that case when we latch to a scroller for the rest of the duration of the scroll only that scroller will scroll regardless of those direction changes (for touch scrolling) and what not. So even if user changes direction if that very scroller that starts the scroll can support scrolling in that new direction (it will break railing) and starts scrolling in that direction. If not just nothing happens. This concept is different from the railing I described earlier. Here is an example you can try. When playing with this example Chrome does latch to a scroller that the scrolling starts on. But doesn't lock the direction of the scroller. It is just that each of the scrollers (one on the document and one on the div with id="scroller") only supports on direction of scrolling. The scroll chains and latching to a scroller is spec'ed here. |
That is the touch-action role here. But touch action doesn't specify quite what the user agent does with that. So I wouldn't say that necessary only applies to the scroll. But we can say here is a new value for touch-action (say 'single-direction') that let the browser to do its own action (being scrolling or pull to refresh or anything else) only on the first direction that user moved their finger. That way UA will lock in the scrolling behaviors and UA will have maybe 3 directions in general like (horizontal, vertical, diagonal) or even maybe only the two x and y directions. Feel free to file a new issue for adding such touch-action value if you believe there are use cases for it out there. At last there is another note regarding the pointercancel event. Even if the particular scroller that got the scroll latching is not scrollable in the starting direction (this particular case only happens when it is root scroller) and user drags the finger on the page, Chrome still sends a pointercancel as if the user starts moving the finger in the other direction Chrome will starts the scrolling of that latched scroller. Here is an example for that. So if you start scrolling in horizontal direction (even though there is nothing to scroll) but Chrome has already taken over that action and latched to the root scroller. So Chrome sends the pointercancel from the beginning and if user then starts moving the finger in vertical document does get scrolled in the y direction. Does that make sense? |
Apologies for the previous long comments. I posted them earlier before doing one the last clean up and hence it might have had some clutters in case you are reading them in email. |
Thanks for all this info @NavidZ. However, I'm still unclear how my test case gets locked to horizontal scrolling in Chrome. Could you explain what Chrome uses to disable vertical scrolling when an horizontal panning gesture is initiated over the blue area, which is not a scroller but just an area listening to pointer events? |
Your example falls into the embedded scrollers on the page and the "scroll latching" case I mentioned. So basically in your page there are two scrollers. The first one is the horizontal scroller which is embedded inside the document vertical scroller. So when you touch the horizontal scroller and move your finger Chrome calculates the scroll chain from where the touch started (basically two scrollers I mentioned) and based on the direction of the scroll it finds the most inner one that can scroll in that direction. From that point on until the finger is released only that scroller will scroll and this never changes for a touch scrolling while touch is down. In that case if the latched scroller is that horizontal scroller then that would scroll until the finger is released regardless of the direction change of scrolling while the finger is down. |
Thanks for your patience @NavidZ :) What I still don't understand is how Chrome determines that the horizontal scroller is a scroller. The scrolling logic is all implemented in JavaScript listening to pointer events, it's just an |
Removing the |
Actually, we can remove JS entirely from the equation, this simple code shows the behavior: <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<div style="touch-action: pan-y; width: 100%; padding-bottom: 100%; background-color: black;"></div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> If you do a horizontal panning gesture over the black rectangle then you will never be able to scroll vertically with this finger in Chrome. If you remove the |
My bad. I actually did build all those examples of mine based on your example but when replying to your last comment I just tried it on the phone and forgot what the code was doing. You are right that there is indeed no second scroller. Only the main document vertical scroller. So Chrome in general decides to think about scrolling when touch point moves beyond slop region. At that point Chrome knows the (at least initial) direction of scrolling. Based on that it first looks at the touch-action. If it is allowed then it sends a pointercancel and start looking into scroll chain and finding the latched scroller for that direction and scrolling. If it is not allowed it gives up the scrolling altogether for the rest of the time it is on the screen regardless of which direction it moves. I believe we followed this text from the spec although it doesn't call this touch direction changes explicitly: "Once a touch action has been started, and the user agent has already determined whether or not the action should be handled as a user agent touch behavior, any changes to the relevant touch-action value will be ignored for the duration of the touch action" However, I cannot think of a scenario now that why we cannot start scrolling if the direction really changes and goes in a direction that touch-action allows. Then I assume we would need to send a pointercancel. Although I need to think about this a little more to make sure whether there is anything going wrong as a result of that. |
My interpretation of this paragraph does not relate to the issue here. To me, what this means is that a change to the I think we have two options:
At any rate I believe we must specify something since the spec as-is is at best unclear but in my opinion does not sufficiently define user-agent behavior for such interactions causing interoperability issues for what I believe to be a reasonable design as demonstrated in the test. |
…ble scrolling altogether if the intial gesture is in the disallowed direction https://bugs.webkit.org/show_bug.cgi?id=202053 <rdar://problem/54542190> Reviewed by Tim Horton. Source/WebKit: Although the Pointer Events specification does not specify this clearly (see w3c/pointerevents#303), setting "touch-action" to a value that only allows scrolling a specific direction ("pan-x" or "pan-y") should disable scrolling in the specified direction if the panning gesture initially is directed in the opposite direction. In practice, this means that setting "touch-action: pan-y" on an element should disable scrolling if the user initially pans horizontally, even if later on in the gesture the user pans vertically. This allows for sites that want to offer a programmatic horizontal scroller to disable vertical scrolling if the user pans horizontally. In order to support this, we add four UISwipeGestureRecognizers, one for each direction, and we selectively allows touches to be recognizer for them based on the "touch-action" value specified at the initial touch location for a given gesture. In the case of "touch-action: pan-y" we only allow the left and right swipe recognizers to be enabled, and in the case of "touch-action: pan-x" we only allow the up and down swipe recognizers to be enabled. If any of those gesture recognizers is recognized, scrolling will be disabled for the duration of this gesture. If a UIScrollView panning gesture recognizer is recognized prior to a swipe, they won't have a chance to be recognized. * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): (-[WKContentView cleanupInteraction]): (-[WKContentView _removeDefaultGestureRecognizers]): (-[WKContentView _addDefaultGestureRecognizers]): (-[WKContentView gestureRecognizer:shouldReceiveTouch:]): LayoutTests: Add new tests checking that setting "touch-action: pan-y" on an element and initiating a horizontal panning gesture will disallow scrolling vertically if a vertical scrolling gesture follows. We test both the case where scrolling would apply to the whole page and the case where scrolling would apply to an "overflow: scroll" element. * pointerevents/ios/touch-action-pan-y-horizontal-gesture-prevents-vertical-scrolling-expected.txt: Added. * pointerevents/ios/touch-action-pan-y-horizontal-gesture-prevents-vertical-scrolling.html: Added. * pointerevents/ios/touch-action-pan-y-in-overflow-scroll-horizontal-gesture-prevents-vertical-scrolling-expected.txt: Added. * pointerevents/ios/touch-action-pan-y-in-overflow-scroll-horizontal-gesture-prevents-vertical-scrolling.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@250183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Pointer Events] touch-action set to pan-x or pan-y alone should disable scrolling altogether if the intial gesture is in the disallowed direction https://bugs.webkit.org/show_bug.cgi?id=202053 <rdar://problem/54542190> Reviewed by Tim Horton. Source/WebKit: Although the Pointer Events specification does not specify this clearly (see w3c/pointerevents#303), setting "touch-action" to a value that only allows scrolling a specific direction ("pan-x" or "pan-y") should disable scrolling in the specified direction if the panning gesture initially is directed in the opposite direction. In practice, this means that setting "touch-action: pan-y" on an element should disable scrolling if the user initially pans horizontally, even if later on in the gesture the user pans vertically. This allows for sites that want to offer a programmatic horizontal scroller to disable vertical scrolling if the user pans horizontally. In order to support this, we add four UISwipeGestureRecognizers, one for each direction, and we selectively allows touches to be recognizer for them based on the "touch-action" value specified at the initial touch location for a given gesture. In the case of "touch-action: pan-y" we only allow the left and right swipe recognizers to be enabled, and in the case of "touch-action: pan-x" we only allow the up and down swipe recognizers to be enabled. If any of those gesture recognizers is recognized, scrolling will be disabled for the duration of this gesture. If a UIScrollView panning gesture recognizer is recognized prior to a swipe, they won't have a chance to be recognized. * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): (-[WKContentView cleanupInteraction]): (-[WKContentView _removeDefaultGestureRecognizers]): (-[WKContentView _addDefaultGestureRecognizers]): (-[WKContentView gestureRecognizer:shouldReceiveTouch:]): LayoutTests: Add new tests checking that setting "touch-action: pan-y" on an element and initiating a horizontal panning gesture will disallow scrolling vertically if a vertical scrolling gesture follows. We test both the case where scrolling would apply to the whole page and the case where scrolling would apply to an "overflow: scroll" element. * pointerevents/ios/touch-action-pan-y-horizontal-gesture-prevents-vertical-scrolling-expected.txt: Added. * pointerevents/ios/touch-action-pan-y-horizontal-gesture-prevents-vertical-scrolling.html: Added. * pointerevents/ios/touch-action-pan-y-in-overflow-scroll-horizontal-gesture-prevents-vertical-scrolling-expected.txt: Added. * pointerevents/ios/touch-action-pan-y-in-overflow-scroll-horizontal-gesture-prevents-vertical-scrolling.html: Added. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250183 268f45cc-cd09-0410-ab3c-d52691b4dbfc git-svn-id: http://svn.webkit.org/repository/webkit/branches/safari-608-branch@250274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Discussed on PEWG call today https://www.w3.org/2020/07/22-pointerevents-minutes.html#item02 - @NavidZ and @mustaqahmed to sync up and likely propose some note/wording for PE spec (option 1 from @graouts) |
Just joining this thread (as an end-developer). I've attempted to come up to speed on this topic, so please forgive me if I get any assumptions wrong. But I had a thought this morning that might be useful. It seems like some type of spec'd "scroll-track-locking" API might be useful to control the track direction browsers allow, specifically, once a touch/scroll event has already been started. This linked issue: ionic-team/ionic-framework#21193 shows an example where scrolling may be desired in one direction, but it may still be useful for advanced gestures to allow scrolling in another direction, and to allow that change to occur programmatically (or via CSS, etc). E.g. Consider a scenario where a users starts scrolling an element (like a swiper) horizontally, but reaches an arbitrary boundary I don't know if "on the fly directional lock", after an event/events have been started, is something being considered, but thought I'd throw it into the mix as something that could benefit from spec'd behavior. Since apparently some browsers (as I gather from reading) handle this differently. |
Circling back to the idea of adding a note in the spec, a la
still wondering - do we want to make this mandatory behavior? Or an non-normative note, couched in "user agents may choose to...", i.e. should it be left up to implementations (though it can cause interop issues)? |
@patrickhlauke I'm just an observer, but my inclination is to lean toward mandatory behavior. As you mentioned, inter-op issues are a concern of option 2. If exceptions need to be made, perhaps additional customization/flexibility can be added in once more use-cases or issues with the design become apparent? |
…ble scrolling altogether if the intial gesture is in the disallowed direction https://bugs.webkit.org/show_bug.cgi?id=202053 <rdar://problem/54542190> Reviewed by Tim Horton. Source/WebKit: Although the Pointer Events specification does not specify this clearly (see w3c/pointerevents#303), setting "touch-action" to a value that only allows scrolling a specific direction ("pan-x" or "pan-y") should disable scrolling in the specified direction if the panning gesture initially is directed in the opposite direction. In practice, this means that setting "touch-action: pan-y" on an element should disable scrolling if the user initially pans horizontally, even if later on in the gesture the user pans vertically. This allows for sites that want to offer a programmatic horizontal scroller to disable vertical scrolling if the user pans horizontally. In order to support this, we add four UISwipeGestureRecognizers, one for each direction, and we selectively allows touches to be recognizer for them based on the "touch-action" value specified at the initial touch location for a given gesture. In the case of "touch-action: pan-y" we only allow the left and right swipe recognizers to be enabled, and in the case of "touch-action: pan-x" we only allow the up and down swipe recognizers to be enabled. If any of those gesture recognizers is recognized, scrolling will be disabled for the duration of this gesture. If a UIScrollView panning gesture recognizer is recognized prior to a swipe, they won't have a chance to be recognized. * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): (-[WKContentView cleanupInteraction]): (-[WKContentView _removeDefaultGestureRecognizers]): (-[WKContentView _addDefaultGestureRecognizers]): (-[WKContentView gestureRecognizer:shouldReceiveTouch:]): LayoutTests: Add new tests checking that setting "touch-action: pan-y" on an element and initiating a horizontal panning gesture will disallow scrolling vertically if a vertical scrolling gesture follows. We test both the case where scrolling would apply to the whole page and the case where scrolling would apply to an "overflow: scroll" element. * pointerevents/ios/touch-action-pan-y-horizontal-gesture-prevents-vertical-scrolling-expected.txt: Added. * pointerevents/ios/touch-action-pan-y-horizontal-gesture-prevents-vertical-scrolling.html: Added. * pointerevents/ios/touch-action-pan-y-in-overflow-scroll-horizontal-gesture-prevents-vertical-scrolling-expected.txt: Added. * pointerevents/ios/touch-action-pan-y-in-overflow-scroll-horizontal-gesture-prevents-vertical-scrolling.html: Added. Canonical link: https://commits.webkit.org/215680@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Pointer Events] touch-action set to pan-x or pan-y alone should disable scrolling altogether if the intial gesture is in the disallowed direction https://bugs.webkit.org/show_bug.cgi?id=202053 <rdar://problem/54542190> Reviewed by Tim Horton. Source/WebKit: Although the Pointer Events specification does not specify this clearly (see w3c/pointerevents#303), setting "touch-action" to a value that only allows scrolling a specific direction ("pan-x" or "pan-y") should disable scrolling in the specified direction if the panning gesture initially is directed in the opposite direction. In practice, this means that setting "touch-action: pan-y" on an element should disable scrolling if the user initially pans horizontally, even if later on in the gesture the user pans vertically. This allows for sites that want to offer a programmatic horizontal scroller to disable vertical scrolling if the user pans horizontally. In order to support this, we add four UISwipeGestureRecognizers, one for each direction, and we selectively allows touches to be recognizer for them based on the "touch-action" value specified at the initial touch location for a given gesture. In the case of "touch-action: pan-y" we only allow the left and right swipe recognizers to be enabled, and in the case of "touch-action: pan-x" we only allow the up and down swipe recognizers to be enabled. If any of those gesture recognizers is recognized, scrolling will be disabled for the duration of this gesture. If a UIScrollView panning gesture recognizer is recognized prior to a swipe, they won't have a chance to be recognized. * UIProcess/ios/WKContentViewInteraction.h: * UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView setupInteraction]): (-[WKContentView cleanupInteraction]): (-[WKContentView _removeDefaultGestureRecognizers]): (-[WKContentView _addDefaultGestureRecognizers]): (-[WKContentView gestureRecognizer:shouldReceiveTouch:]): LayoutTests: Add new tests checking that setting "touch-action: pan-y" on an element and initiating a horizontal panning gesture will disallow scrolling vertically if a vertical scrolling gesture follows. We test both the case where scrolling would apply to the whole page and the case where scrolling would apply to an "overflow: scroll" element. * pointerevents/ios/touch-action-pan-y-horizontal-gesture-prevents-vertical-scrolling-expected.txt: Added. * pointerevents/ios/touch-action-pan-y-horizontal-gesture-prevents-vertical-scrolling.html: Added. * pointerevents/ios/touch-action-pan-y-in-overflow-scroll-horizontal-gesture-prevents-vertical-scrolling-expected.txt: Added. * pointerevents/ios/touch-action-pan-y-in-overflow-scroll-horizontal-gesture-prevents-vertical-scrolling.html: Added. Canonical link: https://commits.webkit.org/215680@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250183 268f45cc-cd09-0410-ab3c-d52691b4dbfc Canonical link: https://commits.webkit.org/213666.386@safari-608-branch git-svn-id: https://svn.webkit.org/repository/webkit/branches/safari-608-branch@250274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…suddenly changes direction Closes #303
Inspiration from w3c/pointerevents#303
I just realized that we have the following WPTs to enforce railing behavior already, with the assumption that railing is active only when panning has started (instead of when finger has moved significantly): My bad that I missed this important point before! Reopening. |
Here is a more precise observation about existing tests, we need to consolidate our discussion here with this: this WPT, for example, has |
I have just completed my investigation, and concluded that I misrepresented those WPTs in my two recent comments 🤦🏼♂️!
Correct interpretation: the test injects a "down" gesture followed by a separate "right" gesture. Same with other similar tests: they inject separate gestures, and never an L-shaped gesture. So the tests are working as intended. My conclusion:
|
So we can close this? |
Working on a test now. |
This test covers the following issue for PointerEvents v3: w3c/pointerevents#303 Change-Id: I37d174f86ea5dbe907655c88d787461f9fda7174
This test covers the following issue for PointerEvents v3: w3c/pointerevents#303 Change-Id: I37d174f86ea5dbe907655c88d787461f9fda7174
This test covers the following issue for PointerEvents v3: w3c/pointerevents#303 Change-Id: I37d174f86ea5dbe907655c88d787461f9fda7174 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4602384 Reviewed-by: Robert Flack <[email protected]> Commit-Queue: Mustaq Ahmed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1155765}
This test covers the following issue for PointerEvents v3: w3c/pointerevents#303 Change-Id: I37d174f86ea5dbe907655c88d787461f9fda7174 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4602384 Reviewed-by: Robert Flack <[email protected]> Commit-Queue: Mustaq Ahmed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1155765}
This test covers the following issue for PointerEvents v3: w3c/pointerevents#303 Change-Id: I37d174f86ea5dbe907655c88d787461f9fda7174 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4602384 Reviewed-by: Robert Flack <[email protected]> Commit-Queue: Mustaq Ahmed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1155765}
… swipe direction changes., a=testonly Automatic update from web-platform-tests Add a WPT for touch-action behavior with swipe direction changes. This test covers the following issue for PointerEvents v3: w3c/pointerevents#303 Change-Id: I37d174f86ea5dbe907655c88d787461f9fda7174 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4602384 Reviewed-by: Robert Flack <[email protected]> Commit-Queue: Mustaq Ahmed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1155765} -- wpt-commits: bfa0d9f154f70c70f076ac756cb1486301983e50 wpt-pr: 40464
… swipe direction changes., a=testonly Automatic update from web-platform-tests Add a WPT for touch-action behavior with swipe direction changes. This test covers the following issue for PointerEvents v3: w3c/pointerevents#303 Change-Id: I37d174f86ea5dbe907655c88d787461f9fda7174 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4602384 Reviewed-by: Robert Flack <[email protected]> Commit-Queue: Mustaq Ahmed <[email protected]> Cr-Commit-Position: refs/heads/main@{#1155765} -- wpt-commits: bfa0d9f154f70c70f076ac756cb1486301983e50 wpt-pr: 40464
I’m looking into an issue reported against Safari in iOS 13 related to Pointer Events. I've created a test case that reduces the issue to a simple usage scenario where a page is designed to only ever scroll vertically but contains an interactive area where the user may scroll horizontally to go through various panels (think an image gallery). The interactive container can be scrolled by listening to pointer events and applying a CSS
transform
to reflect the pan gesture. That interactive container also hastouch-action: pan-y
.In Safari on iOS 13, since the page scrolls vertically, the interactive area will get a
pointercancel
event during a horizontal panning gesture unless the user is careful not to stray from a very straight horizontal panning gesture.However, in Chrome using the Pixel 2 XL in the Developer Tools, if the user starts a panning gesture that is predominantly horizontal, it seems to lock the gesture recognition to the horizontal direction and any change of direction while in flight will not trigger the page to scroll horizontally.
Additionally, in the same Chrome Pixel 2 XL setup, removing the
touch-action: pan-y
property from the interactive container will trigger apointercancel
event even when panning predominantly in the horizontal direction. This doesn't happen in Safari on iOS 13 since the page cannot scroll horizontally.This test shows some interoperability issues and I'd like to understand if these are due to bugs in Safari and/or Chrome, or because of some lacking specifications.
Specifically, I have the following questions:
Does Chrome apply a directional lock of sorts for scrolling such that starting panning in a predominantly horizontal direction prevents any scrolling in the vertical direction? Cc @NavidZ and @RByers from Google who may know more about this Chrome behavior.
If there is such a directional lock, is there a specification that defines this behavior? Under what conditions does that happen? From anecdotal testing, it would appear that, in Chrome, this is tied to the presence of a unidirectional panning restriction using the
touch-action
property.If there isn't a specification defining this behavior, should there be additional behavior to let page authors enable such directional locks? (As an aside, iOS offers an API on
UIScrollView
has thedirectionalLockEnabled
property that allows for just that.)Hopefully all of the Chrome behaviors are already specified, and in this case I'd appreciate some pointers. Otherwise, I think we need to propose some ways to make such content interoperable.
The text was updated successfully, but these errors were encountered: