Previous .modal-body / .cookbook-content lookup matched neither the desktop scroller (.cookbook-body) nor the mobile one (#cookbook-modal .modal-content), so the scroll listener was attached to document.body and never fired. Walk up to whichever scroller actually exists.