maxHeight incorrect
See original GitHub issueHey @FaridSafi !
Awesome job on this chat ! 👏
I’m having an issue with the size of the chat, the Input is taking most of the screen sometimes (Screenshot below).
After investigating it looks like the height returned by onLayout is 0 here.
The correct height is returned on a second call of onLayout, I’ve managed to fix the issue just by adding if (layout.height <= 0) return;
that way the correct height will be used on the next call.
Are you aware of this issue ? Does it seem like the right way to fix it ? I can push you a PR with the fix if you want to 👍
Thanks
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
max-height - CSS: Cascading Style Sheets - MDN Web Docs
The max-height CSS property sets the maximum height of an element. It prevents the used value of the height property from becoming larger ......
Read more >CSS max-height not working - Stack Overflow
Unfortunately, the max-height doesn't seem to work. What am I doing wrong? I am using IE7. html · css.
Read more >max-height - CSS-Tricks
The max-height property in CSS is used to set the maximum height of a specified element. Authors may use any of the length...
Read more >The css propery "max-height" is not applied on element when ...
Why hen I use max-height: 20% -as precents, is not applied on the element, ... the problem is only with "max-height". when I...
Read more >Instructional Staff Turnover and Vacancy (District Totals)
... and miscellaneous categories has been updated to reflect removal of administrators and education specialists incorrectly coded to these categories.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I fix my problem with this
The cause of problem is tag Content
There is just a basic
<GiftedChat user={this.props.user} locale={locale} messages={this.props.messages}/>
in my view. But I’m using react-native-navigation to manage navigation between my views. It may be the cause of the layout recalculation… but I think it’s a good thing to handle the case where the layout would change because the chat becomes unusable otherwise