Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verticalAlign Prop of SVG Text Component Not Working #2475

Open
DanyKrk opened this issue Oct 3, 2024 · 0 comments
Open

verticalAlign Prop of SVG Text Component Not Working #2475

DanyKrk opened this issue Oct 3, 2024 · 0 comments

Comments

@DanyKrk
Copy link

DanyKrk commented Oct 3, 2024

Description

I have encountered an issue with the verticalAlign prop on the Text component. When utilized, it does not function correctly on different platforms. Specifically, on the web, the prop appears to have no effect, while on iOS and Android, it causes the app to crash. In the codebase, specifically in apple/ViewManagers/RNSVGTextManager.mm, there is a statement: RCT_EXPORT_VIEW_PROPERTY(verticalAlign, NSString) // unused on iOS
This suggests that the verticalAlign prop is currently unused on iOS, which might explain the app crashes on this platform. However, on Android, it seems that this prop is implemented, making the crashing behavior unexpected.

Steps to reproduce

  1. Open the provided code in Expo Snack or in a local development environment.
  2. Run the application on a web browser
  3. Run the application on an Android device
  4. Run the application on an iOS device

Snack or a link to a repository

https://snack.expo.dev/bsrXXGF6kJssj58CgpQbm

SVG version

15.3.0

React Native version

0.73.1

Platforms

Android, iOS, Web

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

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

No branches or pull requests

2 participants