8000 iOS 13: Button text gets truncated in the middle when using FormattedString with FontAwesome · Issue #8272 · NativeScript/NativeScript · GitHub
[go: up one dir, main page]

Skip to content
iOS 13: Button text gets truncated in the middle when using FormattedString with FontAwesome #8272
Closed
@felixkrautschuk

Description

@felixkrautschuk

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.3.3
  • @nativescript/core 6.3.2
  • Android Runtime: -
  • iOS Runtime: 6.3.0
  • Plugin(s): -

Describe the bug
in iOS 13, a Button's text gets truncated in the middle when using a FormattedString with FontAwesome. This also happens if the text is short and if there is enough space to show the whole text.
For us, it is only reproducable on iOS 13 Simulator (we have no iOS 13 physical device, but we cannot reproduce it on our iPhone 6 with iOS 12 and the iOS 12 simulator).

Bildschirmfoto 2020-01-23 um 15 32 34

In addition, yo can see on iOS 13 Simulator, that the bottom part of the button's text is cutt off a bit. There is no padding or anything else that could cause this issue.
Bildschirmfoto 2020-01-23 um 15 42 14

Compared to the correct look on iOS 12:
Bildschirmfoto 2020-01-23 um 15 44 27

To Reproduce
Just see the sample app provided below.

Expected behavior
The button's text should only be truncated if the content is too long.
The button's text should not be cut off at the bottom.

Sample project
NSButtonFontAwesomeIssueIOS.zip

Additional context
There is a workaround for truncation in the middle of the text:
Just add a white space to the last Span's text or add a new Span with text=" " at the end of the FormattedString.

But I came to this workaround only by a happy accident, so if there is no prompt fix on this, it should be added to the documentation anywhere at least.

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

      0