Bug 252665
| Summary: | touch-action doesn't apply if element has overflow properties | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Adam Gamble <adam.gamble> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Minor | CC: | graouts, simon.fraser, webkit-bug-importer, wenson_hsieh, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 16 | ||
| Hardware: | iPhone / iPad | ||
| OS: | iOS 16 | ||
Adam Gamble
Basic steps:
- Set `touch-action: none;` on html and body tags.
- Any child elements that set overflow-x or overflow-y will still have touch actions enabled.
Example repro: https://jsfiddle.net/e3hbd2L9/
The computed styles on child nodes is `touch-action: auto` so perhaps this is expected (?) behaviour. Unsure why adding overflow should make a difference though.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Adam Gamble
Ok, perhaps expected considering https://bugs.chromium.org/p/chromium/issues/detail?id=674872#c2
Simon Fraser (smfr)
Are you saying that `touch-action: none` is still allowing overflow regions to scroll, or that other touch interactions also work?
Adam Gamble
Yes that's right, other touch interactions such as pinch-zoom will still work inside overflow regions (but are otherwise prevented).
This might be intentionally the case as I hadn't realised that `touch-action` isn't inherited. Just that the behaviour appeared inconsistent at first.
Radar WebKit Bug Importer
<rdar://problem/106031820>