Tagged: autoscroll, page jumping up
When you get down to the footer on iPhone, the site automatically jumps up the page – what is causing this?
[video src="https://coralstarfish-com.stackstaging.com/wp-content/uploads/2024/10/Footer-jumping-bug.mp4" /]
Your help is as always appreciated
Any takers?
Unfortunately, due to a lack of developer tools, mobile browsers cannot be tested in the same way as desktop browsers. Unfortunately, the emulators aren’t accurate enough.
Since scrolling is triggered by a swipe (touch), I suspect that you could, for example, slightly touch a button which then gets the focus.
This is very speculative, but worth a try.
Try ( in this case only for that page-id of https://coralstarfish-com.stackstaging.com ) in your child-theme functions.php:
function blur_all_avia_buttons() {
if(is_page(22)){
?>
<script type="text/javascript">
window.addEventListener("DOMContentLoaded", function () {
(function($){
$('.avia-button').addClass('btn-blur');
$('.avia-button.btn-blur').on('mousedown touchstart', function(){
$(this).blur();
});
})(jQuery);
});
</script>
<?php
}
}
add_action('wp_footer', 'blur_all_avia_buttons');
Please delete the caches, especially in the mobile device itself.
I’ll give that a try and get back to you – thank you.
or it belongs to viewport height bug on safari mobile.
try instead in quick css:
.avia-safari body {
height: 100vh;
}
@supports (-webkit-touch-callout: none) {
body {
height: -webkit-fill-available;
}
}
They have done the trick – thank you!
what was the solution? first snippet or css bug fix?