Skip to content

boxShadow on TextInput alternates visible/hidden with each key typed on Android #47920

Closed as not planned

Description

@albertsokol

Description

Very simple - when typing in a TextInput on Android, each alternate keypress seems to enable/disable the boxShadow style on the TextInput. This behaviour is not seen on iOS; there, the boxShadow stays visible as expected.
This affects Expo 52/React Native 0.76.

Steps to reproduce

Run the Snack in Android

React Native Version

0.76.3

Affected Platforms

Runtime - Android

Output of npx react-native info

info Fetching system and libraries information...
System:
  OS: Windows 11 10.0.22631
  CPU: (16) x64 Intel(R) Core(TM) i7-9800X CPU @ 3.80GHz
  Memory: 105.98 GB / 127.71 GB
Binaries:
  Node:
    version: 20.10.0
    path: C:\Program Files (x86)\Nodist\bin\node.EXE
  Yarn: Not Found
  npm:
    version: 10.2.3
    path: C:\Program Files (x86)\Nodist\bin\npm.EXE
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-242.23339.11.2421.12550806
  Visual Studio: Not Found
Languages:
  Java: 17.0.13
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.2
    wanted: latest
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.3
    wanted: 0.76.3
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found


Stacktrace or Logs

No error - see the Snack.

Reproducer

https://snack.expo.dev/@albertsokol/android-boxshadow-bug-on-textinput

Screenshots and Videos

No response

Activity

  1. react-native-bot commented on Nov 24, 2024

    @react-native-bot
    Collaborator

    Warning

    Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2.

  2. added
    Component: TextInput
    Platform: Android
    and removed on Nov 24, 2024
  3. react-native-bot commented on Nov 24, 2024

    @react-native-bot
    Collaborator

    Warning

    Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2.

  4. oddlyspaced commented on Nov 24, 2024

    @oddlyspaced
    Contributor

    @albertsokol I wasn't able to replicate it on the snack. Can you check?

  5. albertsokol commented on Nov 24, 2024

    @albertsokol
    Author

    @oddlyspaced hmm, really? It replicates for me in the snack on 2 separate devices. Are you definitely using the Android simulator, and set to Expo 52.0.0?

  6. added
    Needs: Attention
    and removed on Nov 24, 2024
  7. albertsokol commented on Nov 24, 2024

    @albertsokol
    Author
    RPReplay_Final1732460692.mov
  8. NickGerleman commented on Nov 24, 2024

    @NickGerleman
    Contributor

    Thanks for the report! I will try to take a look at this soon. Seems likely something may be fussing around with the inputs background drawable.

    Ad a temporary workaround, does it work if you wrap the input in a view with the shadow?

  9. albertsokol commented on Nov 25, 2024

    @albertsokol
    Author

    @NickGerleman Thanks for taking a look! Yeah, if the shadow is on a wrapping view and not on the TextInput itself, then typing in the TextInput does not affect the parent view shadow, it seems to work correctly.

  10. self-assigned this
    on Nov 25, 2024
  11. NickGerleman commented on Dec 16, 2024

    @NickGerleman
    Contributor

    This does not seem to repro for me, using RNTester playground in main branch build. Might have been fixed since 0.76? Worth retesting on 0.77 or nightly.

    Screen.Recording.2024-12-16.at.12.06.12.PM.mov
  12. added and removed
    Needs: Attention
    on Jan 2, 2025
  13. react-native-bot commented on Jan 27, 2025

    @react-native-bot
    Collaborator

    This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

  14. added
    Stale
    on Jan 27, 2025
  15. react-native-bot commented on Feb 3, 2025

    @react-native-bot
    Collaborator

    This issue was closed because it has been stalled for 7 days with no activity.

  16. react-native-bot commented on Feb 3, 2025

    @react-native-bot
    Collaborator

    This issue was closed because the author hasn't provided the requested feedback after 7 days.

  17. ViniciusLeviVL commented on Jun 3, 2025

    @ViniciusLeviVL

    +1

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

Metadata

Metadata

Assignees

Labels

Component: TextInputNeeds: Author FeedbackNeeds: Version InfoPlatform: AndroidStale

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions