mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-05 22:00:59 +00:00
quickfix: StickyContainer maxScrollTop must be lower than 0
This commit is contained in:
parent
f4b51d606f
commit
3e657d6558
@ -130,7 +130,7 @@ export default class StickyContainer extends React.PureComponent<Props, State> {
|
|||||||
// make sure that wrapper will not be over scrolled
|
// make sure that wrapper will not be over scrolled
|
||||||
if (state.wrapperTopOffset > 0) state.wrapperTopOffset = 0;
|
if (state.wrapperTopOffset > 0) state.wrapperTopOffset = 0;
|
||||||
const maxScrollTop = viewportHeight - wrapperBounds.height;
|
const maxScrollTop = viewportHeight - wrapperBounds.height;
|
||||||
if (state.wrapperTopOffset < maxScrollTop) state.wrapperTopOffset = maxScrollTop;
|
if (maxScrollTop < 0 && state.wrapperTopOffset < maxScrollTop) state.wrapperTopOffset = maxScrollTop;
|
||||||
} else {
|
} else {
|
||||||
// update wrapper "top" to be same as "aside" element
|
// update wrapper "top" to be same as "aside" element
|
||||||
state.wrapperTopOffset = asideBounds.top;
|
state.wrapperTopOffset = asideBounds.top;
|
||||||
|
Loading…
Reference in New Issue
Block a user