fix(browser-extension): issue #547
This commit is contained in:
parent
ddd1860f9f
commit
a2c0c17493
@ -220,12 +220,12 @@ function isInViewport(element) {
|
|||||||
const height = window.innerHeight || document.documentElement.clientHeight;
|
const height = window.innerHeight || document.documentElement.clientHeight;
|
||||||
const position = element.getBoundingClientRect();
|
const position = element.getBoundingClientRect();
|
||||||
const scroll = window.scrollY;
|
const scroll = window.scrollY;
|
||||||
const transitioning = styles.transitionDuration !== '0s';
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
position.bottom === position.top ||
|
position.bottom === position.top ||
|
||||||
(scroll + position.top <= scroll + height && scroll + position.bottom >= scroll) ||
|
(scroll + position.top <= scroll + height && scroll + position.bottom >= scroll) ||
|
||||||
transitioning
|
styles.animationDuration !== '0s' ||
|
||||||
|
styles.transitionDuration !== '0s'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user