Skip to content

Conversation

kkafar
Copy link
Member

@kkafar kkafar commented May 9, 2025

Description

Fixes #2842

RNSModalScreen sends non-zero contentOffsetY to its shadow node. This is wrong, because its content in HostTree is not offset by any means, as there is no associated navigation bar. I do not know, why we do sent non-zero header height there. I guess that this case was overlooked in #2028.

Above behaviour leads to discrepancies between HostTree & ShadowTree positions of descendant views, causing problems with pressables.

Changes

Test code and steps to reproduce

Added Test2915 to test exactly this case.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

kkafar added 2 commits May 9, 2025 16:16
This should not be the final solution, as it just another edge case to
the existing code & makes it even more spaghetti-like.
@kkafar kkafar marked this pull request as ready for review May 10, 2025 10:58
@kkafar kkafar added the Backport to v3 This PR / PR resolving this issue should be backported to v3 line of the library label May 10, 2025
@kkafar kkafar requested review from kligarski and maciekstosio May 12, 2025 10:16
Copy link
Contributor

@kligarski kligarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@kkafar kkafar merged commit 997d44c into main May 12, 2025
8 of 11 checks passed
@kkafar kkafar deleted the @kkafar/2842-header-pressables-landscape branch May 12, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport to v3 This PR / PR resolving this issue should be backported to v3 line of the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

headerRight onPress not working in landscape
2 participants