Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setTimeout(() => {
const yOffset = -(window.innerHeight / 2)
+ getAbsoluteHeight(this.cardElement)
+ variables.paymentBar.height;
this.cardElement.scrollIntoView({
behavior: 'smooth',
yOffset,
});
}, CART_INPUT_AUTO_SCROLL_DELAY);
}
componentDidUpdate() {
this.transitionElement.style.height = `${getAbsoluteHeight(this.cardElement)}px`;
}
componentDidMount() {
this.transitionElement.style.height = `${getAbsoluteHeight(this.cardElement)}px`;
}
setTimeout(() => {
const yOffset = -(window.innerHeight / 2)
+ getAbsoluteHeight(this.cardElement)
+ variables.paymentBar.height;
this.cardElement.scrollIntoView({
behavior: 'smooth',
yOffset,
});
}, CART_INPUT_AUTO_SCROLL_DELAY);
}