question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Button content does not render text correctly

See original GitHub issue

Issue type

I’m submitting a …

  • bug report
  • feature request

Issue description

Current behavior:

I just installed the library in an existing Expo App, and in the process of replacing the default react-native components with their equivalents in UI Kitten. After moving the content from the title prop to inside the component, the text renders incorrectly, always dropping the last word, unless I add a trailing space.

Expected behavior:

The button should just straight up render the content as is

Steps to reproduce:

Create a component using the default react native button, and set the title to ‘FOO BAR’, it will render ‘FOO BAR’ as content. If you then replace the button component with the one from UI Kitten, it will render just ‘FOO’. Using {'FOO BAR '}, with an extra space, will render ‘FOO BAR’

Related code:

import React from 'react'
import { withNavigation } from 'react-navigation'
import { Button } from 'react-native-ui-kitten';

export default withNavigation(
    ({navigation}) =>
        <Button onPress={ _ => navigation.navigate('ItemCreate') } size='small' appearance='ghost'>
            ADD AN ITEM
        </Button>
)

Other information:

OS, device, package version

OS: macOS Mojave, 10.14.5
Packages: React Native 33.0.0., Expo 33.0.0, UI Kitten 4.1.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
flexboxcommented, Nov 19, 2019

Hello @nmokkenstorm I know it’s a frustrating but it’s not related with kitten UI.

As @artyorsh said this issue is due to a bug in the font on OnePlus phones

You can found some info here:

And feel free to close this issue if you problem is solved 😉

0reactions
artyorshcommented, Nov 19, 2019

Thanks for the detailed explanation @flexbox 👍 Here is one more notice on having issues with fonts on Apple devices. Will just leave it here for easier navigation

Read more comments on GitHub >

github_iconTop Results From Across the Web

Button text not rendering correctly on iPhone (CSS3)
Ive tried -webkit-appearance: none!important; but have had no luck. I tried it on every element. Anyone know what I can do to get...
Read more >
Button control is not rendering correctly.. - MSDN - Microsoft
I inserted one "div" and kept two label, two textbox, one button, one checkbox and one hyperlink inside "div". when i run the...
Read more >
Button text rendering issue in Outlook Desktop on Windows
All clients beside Outlook for Desktop (Windows) is rendering the bold text correctly, in this client the text is always "normal".
Read more >
<input>: The Input (Form Input) element - HTML
button, A push button with no default behavior displaying the value of the ... Looks like a text input, but has validation parameters...
Read more >
Forms in HTML documents - W3C
If no radio button in a set sharing the same control name is initially "on", ... of content types that a server processing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found