Adjust the scroll position when the gemini panel is resized

Make sure we restore the scroll state of the message panel when it is resized
pull/21833/head
Richard van der Hoff 2016-03-14 15:29:29 +00:00
parent 8a4a810d1f
commit 61cd66304e
2 changed files with 3 additions and 2 deletions

View File

@ -33,7 +33,7 @@
"q": "^1.4.1",
"react": "^0.14.2",
"react-dom": "^0.14.2",
"react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#d9a808d",
"react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#3ee2648",
"sanitize-html": "^1.11.1",
"velocity-animate": "^1.2.3",
"velocity-ui-pack": "^1.2.2"

View File

@ -470,7 +470,8 @@ module.exports = React.createClass({
// TODO: the classnames on the div and ol could do with being updated to
// reflect the fact that we don't necessarily contain a list of messages.
// it's not obvious why we have a separate div and ol anyway.
return (<GeminiScrollbar autoshow={true} ref="geminiPanel" onScroll={ this.onScroll }
return (<GeminiScrollbar autoshow={true} ref="geminiPanel"
onScroll={this.onScroll} onResize={this.checkScroll}
className={this.props.className} style={this.props.style}>
<div className="mx_RoomView_messageListWrapper">
<ol ref="itemlist" className="mx_RoomView_MessageList" aria-live="polite">