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.

Small jerk in the composer top border and the messages list when composer input changes from filled to unfilled and vice-versa in Android only.

See original GitHub issue

Issue Description

I am facing a small jerk in the composer top header and the message listing when the Composer Text Input changes from Filled to UnFilled state and vice-versa in Android only. In iOS, everything works fine.

Steps to Reproduce / Code Snippets

  • Tap on the Composer text input
  • Start typing
  • When first character is typed into the input and back button is pressed and text input is made empty, small jerk occurs. Whenever the composer size is changes, the jerk occurs.
  • However, when I dig deep into the code of the composer and comment the onContentSizeChange method in the Composer.js file inside the node-modules, the jerk disappears but the composer height does not changed on hitting Enter or going to new line.
  • Code:
<GiftedChat
    messages={this.state.messages}
    onSend={messages => this.onSend(messages)}
    user={{
          _id: 1,
     }}
    alwaysShowSend
 />

GiftedChatIssue

Expected Results

The composer input should not jerk when composer size changes on Android.

Additional Information

  • Nodejs version: 10.16.0
  • React version: 16.9.0
  • React Native version: 0.61.5
  • react-native-gifted-chat version: 0.13.0
  • Platform(s) (iOS, Android, or both?): Android

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
Muhammad-Saleetcommented, Aug 26, 2021

It looks like whats causing this issue is a hard coded value for lineHeight of the TextInput. Overriding that value with undefined solved this issue for me:

import { Composer, GiftedChat } from 'react-native-gifted-chat';

const ChatComponent = () => {
    const renderComposer = (props) => (
        <Composer
            {...props}
            textInputStyle={{
                lineHeight: undefined,
            }}
        />
    );

    return (
        <GiftedChat
            renderComposer={renderComposer}
        />
    );
}
1reaction
ajaykumar97commented, Mar 5, 2020

I am still facing this small jerk issue. Please let me know if anyone found the solution for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Untitled
Mini split system heat pump reviews, Pd-m9000, Sprint data only plan tablet. ... Game android 2014 seru, Airline names list, Heart of the...
Read more >
Untitled
Daymak 401 pocket bikes, Woman in t shirt only, Different type de roche volcanique, Tvs motor bike models, Jamie lee thurston song list,...
Read more >
Untitled
96 jeep cherokee problems starting, Best speed reading app android, Piment thai marseille menu! Dewalt d25102! Phipps conservatory pittsburgh events, ...
Read more >
Natural Processing Langugage and Swift Key-THe importance ...
The file size of each document is extremely large, in further analysis we will have to only use a fraction of these documents...
Read more >
project1_tweets.txt - surdeanu.info
#happy Just added myself to the http://wefollow.com twitter directory under: #mom #happy ... Cuz they're not filled w/ amazing cartoons like we had...
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