Skip to content

fix: issue with the picker not opening on ios with the new architecture#542

Closed
exlymex wants to merge 1 commit into
lawnstarter:masterfrom
exlymex:fix/add-pointer-event-to-TextInput
Closed

fix: issue with the picker not opening on ios with the new architecture#542
exlymex wants to merge 1 commit into
lawnstarter:masterfrom
exlymex:fix/add-pointer-event-to-TextInput

Conversation

@exlymex

@exlymex exlymex commented Mar 15, 2024

Copy link
Copy Markdown

On the new architecture the TextInput used to display the text was intercepting events. This seems to be caused by the view-flattening algorithm moving it out of the parent view which has pointerEvents="box-only" set.

The solution would be either to add pointerEvents="none" to the TextInput itself, as done in this PR, or to disable the view flattening for the parent view (by adding collapsable={false} prop to it), so the native view structure would match the react one.

@exlymex exlymex changed the title fix: fixed the problem with the picker not opening on ios with the new architecture fix: issue with the picker not opening on ios with the new architecture Mar 16, 2024
@lfkwtz

lfkwtz commented Apr 23, 2024

Copy link
Copy Markdown
Contributor

does this have any regressions on the previous architecture?

@THE-REK

THE-REK commented Nov 7, 2024

Copy link
Copy Markdown

When I do this I can click on the picker, but the modal that opens goes to the top of the screen and is not visible.

@NoodleOfDeath NoodleOfDeath left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks good. Can we merge this ASAP?

@dakota-kallas

Copy link
Copy Markdown

Agreed, this fixes the breaking change with Expo SDK 52.

@exlymex

exlymex commented Jan 1, 2025

Copy link
Copy Markdown
Author

does this have any regressions on the previous architecture?

This fix should be enough to fix this problem. And after doing a regression, I didn't notice any new problems arise.

@NoodleOfDeath

Copy link
Copy Markdown

does this have any regressions on the previous architecture?

This fix should be enough to fix this problem. And after doing a regression, I didn't notice any new problems arise.

no new problems <<<< breaking changes IMPO (in my personal opinion) this needs to be expedited sooner than later

@lfkwtz

lfkwtz commented Jan 6, 2025

Copy link
Copy Markdown
Contributor

@exlymex can you fix the conflicts?

@blur94

blur94 commented Jan 10, 2025

Copy link
Copy Markdown

Please, can this PR be merged? This can help resolve this particular issue. Please fix the conflict @exlymex

@depsimon

Copy link
Copy Markdown

In the meantime you can now pass the props to the Picker: textInputProps={{ pointerEvents: "none" }}

@paulinhapenedo

Copy link
Copy Markdown
Contributor

Thank you for this contribution! This PR addresses the exact same root cause — the picker not opening on iOS with the new architecture.

PR #749 fixes this at the source: renderTextInputOrChildren() used pointerEvents="box-only" on the input container, which intercepts touch events before the parent TouchableOpacity can handle them under RN 0.81's new architecture. Changing it to pointerEvents="none" resolves it cleanly on both iOS simulator and device.

#749 also includes the full test toolchain modernisation (Enzyme → RNTL, Jest 23 → 29, React 16 → 18) and lodash removal, which keeps the library maintainable going forward.

Closing this in favour of #749 — the fix you identified is correct and is now shipping.

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.

9 participants