mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-10 10:11:25 +08:00
Merge pull request #1632 from DavidChouinard/extraneous-scrollbar-fix
Fixes scrollbar display when content is not scrollable
This commit is contained in:
commit
a91add4523
1 changed files with 5 additions and 0 deletions
|
@ -100,6 +100,7 @@ class Scrollbar extends React.Component
|
||||||
bottom: 0
|
bottom: 0
|
||||||
right: 0
|
right: 0
|
||||||
zIndex: 2
|
zIndex: 2
|
||||||
|
visibility: "hidden" if @state.totalHeight != 0 && @state.totalHeight == @state.viewportHeight
|
||||||
|
|
||||||
_onHandleDown: (event) =>
|
_onHandleDown: (event) =>
|
||||||
handleNode = React.findDOMNode(@refs.handle)
|
handleNode = React.findDOMNode(@refs.handle)
|
||||||
|
@ -197,6 +198,10 @@ class ScrollRegion extends React.Component
|
||||||
attributeFilter: ['style']
|
attributeFilter: ['style']
|
||||||
})
|
})
|
||||||
|
|
||||||
|
componentDidUpdate: (prevProps, prevState) =>
|
||||||
|
if (@props.children != prevProps.children)
|
||||||
|
@recomputeDimensions()
|
||||||
|
|
||||||
componentWillReceiveProps: (props) =>
|
componentWillReceiveProps: (props) =>
|
||||||
if @shouldInvalidateScrollbarComponent(props)
|
if @shouldInvalidateScrollbarComponent(props)
|
||||||
@_scrollbarComponent = null
|
@_scrollbarComponent = null
|
||||||
|
|
Loading…
Reference in a new issue