1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-30 20:28:09 +00:00

quickfix: added maxScollTop to StickyContainer

This commit is contained in:
Szymon Lesisz 2018-10-15 16:49:57 +02:00
parent 44619c0a95
commit f4b51d606f

View File

@ -129,6 +129,8 @@ export default class StickyContainer extends React.PureComponent<Props, State> {
}
// make sure that wrapper will not be over scrolled
if (state.wrapperTopOffset > 0) state.wrapperTopOffset = 0;
const maxScrollTop = viewportHeight - wrapperBounds.height;
if (state.wrapperTopOffset < maxScrollTop) state.wrapperTopOffset = maxScrollTop;
} else {
// update wrapper "top" to be same as "aside" element
state.wrapperTopOffset = asideBounds.top;