Skip to content

fix(hosting): restore macOS tap gestures in offset views - #1084

Merged
Kyle-Ye merged 1 commit into
mainfrom
bugfix/macos_gesture_transform
Sep 14, 2026
Merged

Kyle-Ye merged 1 commit into
mainfrom
bugfix/macos_gesture_transform

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Sep 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Restore onTapGesture delivery when an NSHostingView has a nonzero offset in its window by providing the host-to-window root transform.
  • Keep gesture hit testing correct when the host or an ancestor moves by invalidating the transform through geometry observation.
  • Add regression coverage for coordinate conversion, geometry changes, observer lifetime, and native clicks in borderless and titled windows.

Closes #1083.

@Kyle-Ye
Kyle-Ye requested a review from Mx-Iris as a code owner September 14, 2026 16:18
@github-actions github-actions Bot added area: event-gesture Events, gestures, tracing, or interaction plumbing. area: hosting-bridge SwiftUI bridge, UIHosting/NSHosting, representables, and platform host views. platform: macOS macOS-specific behavior or support. type: bug Something is not working correctly. labels Sep 14, 2026
@tuist

tuist Bot commented Sep 14, 2026

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Cache hit rate Tests Skipped Ran Commit
OpenSwiftUI 0 % 1224 0 1224 f07c601c8

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI 36.5s f07c601c8

@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 28.22%. Comparing base (a321de1) to head (63fc8fe).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1084      +/-   ##
==========================================
- Coverage   30.40%   28.22%   -2.19%     
==========================================
  Files         802      749      -53     
  Lines       63525    55199    -8326     
==========================================
- Hits        19317    15581    -3736     
+ Misses      44208    39618    -4590     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye
Kyle-Ye merged commit 4b84bd3 into main Sep 14, 2026
5 of 6 checks passed
@Kyle-Ye
Kyle-Ye deleted the bugfix/macos_gesture_transform branch September 14, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: event-gesture Events, gestures, tracing, or interaction plumbing. area: hosting-bridge SwiftUI bridge, UIHosting/NSHosting, representables, and platform host views. platform: macOS macOS-specific behavior or support. type: bug Something is not working correctly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS: onTapGesture does not fire in an offset NSHostingView

1 participant