react-truncate icon indicating copy to clipboard operation
react-truncate copied to clipboard

Last line length changes when parent component set to display none

Open james-jenkinson opened this issue 3 years ago • 0 comments

When the text to be truncated is part of a component who's display property is set to none, on re-appearing the length of the last line changes, often causing a new line.

Example can be seen here: https://codepen.io/jajenkinson/pen/PoGQRRb?editors=0110

Steps to reproduce

  • Hover of the card
  • Confirm the text is properly truncated to three lines
  • Hovering multiple times the text will remain correctly truncated
  • Click the button to hide the card
  • Click again to show the card
  • Confirm the text is incorrectly truncated

james-jenkinson avatar Dec 31 '20 11:12 james-jenkinson