Hi,
you can achieve your goal by adding the following code snippet to your theme functions.php
if ( ! function_exists( 'yith_wcqv_customization_disable_scrolling' ) ) {
add_filter( 'wp_enqueue_scripts', 'yith_wcqv_customization_disable_scrolling', 999 );
function yith_wcqv_customization_disable_scrolling() {
$js = "( function( $ ){
var qv_modal = $(document).find( '#yith-quick-view-modal' ),
qv_overlay = qv_modal.find( '.yith-quick-view-overlay'),
qv_close = qv_modal.find( '#yith-quick-view-close' ),
disableScrolling = function (){
var x=window.scrollX;
var y=window.scrollY;
window.onscroll=function(){window.scrollTo(x, y);};
},
enableScrolling = function (){
window.onscroll=function(){};
}
$(document).on('qv_loader_stop', disableScrolling);
qv_overlay.on( 'click', function(e){
enableScrolling();
});
$(document).keyup(function(e){
if( e.keyCode === 27 )
enableScrolling();
});
qv_close.on( 'click', function(e) {
enableScrolling();
});
} )( jQuery );";
wp_add_inline_script( 'yith-wcqv-frontend', $js );
}
}
Please try this solution and let us know if everything works fine!