Skip to content

Conversation

Little-tale
Copy link
Contributor

Summary

This PR fixes a touch passthrough issue on iOS 26 when a popup transitions from off-screen to on-screen. With a minimal, localized change inside hitTest(_:with:), touches are now correctly delivered to the popup without altering existing behavior.

Changes

• Convert the touch point into the root view’s coordinate space for accurate hit-testing.
• On iOS 26+, use point(inside:with:) together with isTouchInsideSubviewForiOS26 to ensure only intended touch regions receive input:

@available(iOS 26.0, *)
  private func isTouchInsideSubviewForiOS26(point: CGPoint, view: UIView) -> UIView? {
      guard view.layer.hitTest(point)?.name == nil else {
          return nil
      }
      return view
  }

• Fallback to the existing isTouchInsideSubview logic on older iOS versions to preserve previous behavior.

Result
• Only the areas that should be touchable are now touchable; background taps pass through as expected.

I am sorry for raising the PR again.

@Little-tale
Copy link
Contributor Author

@f3dm76
have to merge to that code
The iOS26 operation is successful.

@gereons
Copy link

gereons commented Sep 24, 2025

+1 for merging this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants