[SwiftUI] Cursor system is unreliable

Originator:flavio
Number:rdar://FB9045245 Date Originated:2021-03-16
Status:Open Resolved:No
Product:SwiftUI / macOS Product Version:
Classification:Incorrect/Unexpected Behavior Reproducible:Yes
 
Please describe the issue:
===
The cursor system simply does not work with SwiftUI, specially when relying on `onHover` to modify the cursor.
Please list the steps you took to reproduce the issue:
1. Open the attached project and run it
2. Hover each of the buttons with the mouse pointer.
3. The first button will modify the cursor appropriately
4. The last 3 buttons will not since they use `onHover `

What did you expect to happen?
===
All buttons should present a `pointingHand` cursor when hovering regardless of their style.

What actually happened?
===
The cursor system is reset and becomes unreliable if the view updates (by applying a style, for instance)

Comments

Example

Check https://github.com/fjcaetano/not-awesome-swiftui


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!