Why can I not scroll past my parallax without moving the mouse first? Why can I not scroll past my parallax without moving the mouse first? vue.js vue.js

Why can I not scroll past my parallax without moving the mouse first?


First thing first, I would suggest adding a position: relative; in the .parallax in order to remove the double scroll.

The issue you're experiencing is a browser related scrolling issue and not a problem with your code (it does work on Firefox, but not on Chrome for example). So there's no "fix".

But there's clearly other ways to go about using parallax to prevent the issue from even happening like scroll each parallax manually without relying on browser's scroll.

Or you can simulate a click when reaching the top or the bottom to be able to overcome the issue :

$('div').on('scroll', chk_scroll);function chk_scroll(e) {  var elem = $(e.currentTarget);  if (elem[0].scrollHeight - elem.scrollTop() == elem.outerHeight()) {    $("#parallax").trigger("click");  } else if (elem.scrollTop() == 0) {    $("#parallax").trigger("click");  }}