Merge pull request #1632 from DavidChouinard/extraneous-scrollbar-fix

Fixes scrollbar display when content is not scrollable
This commit is contained in:
Jackie Luo 2016-03-11 17:31:19 -08:00
commit a91add4523

View file

@ -100,6 +100,7 @@ class Scrollbar extends React.Component
bottom: 0
right: 0
zIndex: 2
visibility: "hidden" if @state.totalHeight != 0 && @state.totalHeight == @state.viewportHeight
_onHandleDown: (event) =>
handleNode = React.findDOMNode(@refs.handle)
@ -197,6 +198,10 @@ class ScrollRegion extends React.Component
attributeFilter: ['style']
})
componentDidUpdate: (prevProps, prevState) =>
if (@props.children != prevProps.children)
@recomputeDimensions()
componentWillReceiveProps: (props) =>
if @shouldInvalidateScrollbarComponent(props)
@_scrollbarComponent = null