Search code examples
htmlcssioswebkitmobile-safari

Can I limit native-style scrolling to one axis in Mobile Safari?


To enable native style scrolling on DOM elements in Mobile Safari, you can use this custom CSS property on the containing element:

-webkit-overflow-scrolling: touch;

Is it possible to limit the scrolling to only a single axis? My goal is to achieve the equivalent of this:

overflow-x: scroll;
overflow-y: hidden;

Defining the standard CSS properties as above does not seem to have any effect.


Solution

  • Based on what I can find, it appears that this is not currently possible. So as not to leave anyone hanging, I'll mark this as the correct answer until/if Apple ever makes a relevant change in Mobile Safari's behavior.