I have the same issue but this may not be the fix but a work-around.
const updatePositionOfCtaButton = () => {
if (
window.navigator.userAgent.toLowerCase().includes('safari') &&
window.navigator.userAgent.toLowerCase().includes('mobile') &&
document.documentElement.clientHeight > window.innerHeight &&
!document.hidden
) {
document.querySelector('.callToActionButton').style.bottom = '44px';
} else {
document.querySelector('.callToActionButton').removeAttribute('style');
}
}
window.addEventListener('scroll', updatePositionOfCtaButton);
document.addEventListener('visibilitychange', updatePositionOfCtaButton);
We can also add transition
to the CTA button to add a little animation
.callToActionButton {
transition: bottom 0.16s linear 0s;
}