malte-wessel / react-textfit

React component to fit headlines and paragraphs into elements
http://malte-wessel.github.io/react-textfit/
MIT License
469 stars 143 forks source link

el.clientHeight == 0, preventing resizing #73

Open aeoncleanse opened 3 years ago

aeoncleanse commented 3 years ago
process (Textfit.js:137)
TextFit._this.handleWindowResize (Textfit.js:77)
call (throttle.js:26)
throttled (throttle.js:36)

I have no idea why, but no matter what I do to the parent, or to the Textfit element itself with styles, the element's clientHeight appears to follow a pattern of X, 0, 0, X, 0, 0 etc when resizing a window. Perhaps something to do with the throttler?