Skip to content

verticalAlign Prop of SVG Text Component Not Working #2475

@DanyKrk

Description

@DanyKrk

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions