Skip to content

fix: support RN 0.85 hidden input absolute fill behavior#117

Open
anday013 wants to merge 1 commit intomainfrom
codex/fix-deprecated-stylesheet.absolutefillobject-usage
Open

fix: support RN 0.85 hidden input absolute fill behavior#117
anday013 wants to merge 1 commit intomainfrom
codex/fix-deprecated-stylesheet.absolutefillobject-usage

Conversation

@anday013
Copy link
Copy Markdown
Owner

Motivation

  • React Native 0.85 deprecated StyleSheet.absoluteFillObject which caused the OTP hidden TextInput to affect layout and make OTP cells move when filled.
  • The fix must be applied in the source styles (not only dist) so all consumers get the RN 0.85-compatible behavior.

Description

  • Remove ...StyleSheet.absoluteFillObject from hiddenInput in src/OtpInput/OtpInput.styles.ts and keep only the platform-visibility rules (opacity/color).
  • Apply StyleSheet.absoluteFill directly in the rendered TextInput style array in src/OtpInput/OtpInput.tsx via style={[StyleSheet.absoluteFill, styles.hiddenInput, textInputProps?.style]} to ensure absolute overlay behavior on RN 0.85.
  • Add a minimal regression test in src/OtpInput/__tests__/OtpInput.test.tsx that asserts the hidden input has absolute positioning and thus cannot affect OTP cell spacing, and update the snapshot accordingly.
  • Regenerated build artifacts via the project tsc build so the produced dist output matches the source change.
  • This change closes issue Support react native 0.85 #116.

Testing

  • Ran npm test -- --runInBand -u and all tests passed with the snapshot updated successfully.
  • Ran npm run ts:check (tsc --noEmit) and it completed without errors.
  • Ran npm run build:prod (tsc -p tsconfig.prod.json) and the production build completed successfully.
  • Verified there are no remaining absoluteFillObject occurrences in src or dist after the change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant