ScrollView overrides allowsHitTesting property of underlying views

Originator:ZekeKSnider
Number:rdar://FB9022612 Date Originated:2/27/2021
Status:Open Resolved:
Product:SwiftUI Product Version:macOS 11.2.1
Classification:Incorrect/Unexpected Behavior Reproducible:Yes
 
Description:
On macOS target for SwiftUI, using a ScrollView overrides the allowsHitTesting property of all contained elements. For example, a button with allowsHitTesting(false) inside a ScrollView will still be clickable. This behavior is not exhibited on iOS targets.

Reproduction steps:
Place a Button with allowsHitTesting(false) in a ScrollView. Run the app.

Expected Result:
The button is not clickable and does observe any events.

Observed Result:
The button is clickable.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!