Bug 252665 - touch-action doesn't apply if element has overflow properties
Summary: touch-action doesn't apply if element has overflow properties
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 16
Hardware: iPhone / iPad iOS 16
: P2 Minor
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-21 07:56 PST by Adam Gamble
Modified: 2023-02-28 07:57 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Gamble 2023-02-21 07:56:35 PST
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.
Comment 1 Adam Gamble 2023-02-21 07:59:20 PST
Ok, perhaps expected considering https://bugs.chromium.org/p/chromium/issues/detail?id=674872#c2
Comment 2 Simon Fraser (smfr) 2023-02-21 12:30:39 PST
Are you saying that `touch-action: none` is still allowing overflow regions to scroll, or that other touch interactions also work?
Comment 3 Adam Gamble 2023-02-22 02:47:32 PST
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.
Comment 4 Radar WebKit Bug Importer 2023-02-28 07:57:20 PST
<rdar://problem/106031820>