reactScrollbar icon indicating copy to clipboard operation
reactScrollbar copied to clipboard

using scrollArea.scrollBottom giving TypeError: cannot readt property 'offsetHeight' of null

Open ibmkaga opened this issue 7 years ago • 1 comments

The error in console is - TypeError: Cannot read property 'offsetHeight' of null at t.value (scrollArea.js?5ff8:1) at t.value (scrollArea.js?5ff8:1) at t.value (scrollArea.js?5ff8:1) at Object.scrollBottom (scrollArea.js?5ff8:1) at ChatMessage.componentDidUpdate (chatMessage.js?8dd7:12) at ChatMessage.proxiedMethod (createPrototypeProxy.js?c130:44) at measureLifeCyclePerf (ReactCompositeComponent.js?d2b3:75) at eval (ReactCompositeComponent.js?d2b3:728) at CallbackQueue.notifyAll (CallbackQueue.js?f006:76) at ReactReconcileTransaction.close (ReactReconcileTransaction.js?ba2e:80)

Looking at the source code it seems the wrapper (less likely its content) object is coming as null in the computeSizes() method and that is having ripple effect.

changed the scrollBar to other places but no effect, does it require to be inside a wrapper/container when putting ScrollBar.

Regards, Kapil.

ibmkaga avatar Sep 16 '17 17:09 ibmkaga

Probably, I solved this issue in my fork a month ago: https://github.com/mishantrop/reactScrollarea/commit/6fff885f6e20813736e8d831f5d860b6f5816ed0

mishantrop avatar Oct 03 '17 04:10 mishantrop