1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-31 19:30:53 +00:00

calculate the Indicator position with scroll offset

This commit is contained in:
slowbackspace 2019-01-03 14:22:43 +01:00
parent 1e7f0d35be
commit e84e1867c7

View File

@ -76,7 +76,7 @@ class Indicator extends PureComponent<Props, State> {
const active = wrapper.querySelector('.active');
if (!active) return;
const bounds = active.getBoundingClientRect();
const left = bounds.left - wrapper.getBoundingClientRect().left;
const left = bounds.left - wrapper.getBoundingClientRect().left + wrapper.scrollLeft;
const { state } = this;
if (state.style.left !== left) {