Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFully polyfill touch-action behaviour for scrolling #311
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While looking into (#309) using passive event listeners and the native
touch-actionproperty, we came across some inconsistencies in PEPs way of calculating thetouch-actionproperty.The spec says:
Up to now, we have not properly calculated the intersection of the
touch-actionproperties of all ancestors of an element up to the element with the default touch behaviour.To us, the default scroll behaviour is the most relevant default touch behaviour and generally the one with the most impact.
For scrolling, the element "creating" a scrollable area is the one with the default scroll behaviour. E.g. an element with the CSS property
overflow: scrollwill be the the element with default scroll behaviour, its children will not be.An element has a default scroll behaviour if (not guaranteed to be all cases):
overflow: scroll,overflow-x: scrolloroverflow-y: scrolloverflow: auto,overflow-x: autooroverflow-y: autoand the content is larger than the element.An example of the different behaviours. Try it in Chrome with the mobile emulator.
Chrome's implementation for computing the
touch-actionvalue.This mostly just summarises this weeks PEP meeting. Thanks to @RByers for the insights!