mousewheel-stops-working-on-google-chrome

Farzad asked 1 year ago

Mousewheel stops working on google chrome starting yesterday.  

36 Answers
Fergas answered 1 year ago

Same problem here, please help.And it started yesterday after i updated Chrome, from v60 to v61. I disabled all the plugins, exept the Cherry Lazy Load Boxes Plugin,Cherry MediaParallax Plugin,Cherry Parallax Plugin and the cherry plugin and the problem persisted. Note: WordPress didnt let me disable those. They stayed activated no matter what. Already checked it in 4 different pcs. Site works fine in IE and Firefox. I can scroll with the keyboard arrow, with the scroll-bar and with the mouse weel button, but not with the mouse weel scroll. 

Fergas answered 1 year ago

The problem was with the Cherry Framework’s Jquery, its outdated.
So when chrome updated the problem showed up. I used ‘jQuery Updater’
plugin, scroll finally works, but almost everything is deformed.
Too much work ahead of me. Try it and tell me Farzad. Also dont be afraid 
to use the plugin, once deactivated everything goes back to normal, no conficts.

Farzad answered 1 year ago

For now I removed the mouswheel.js file and the only thing I lost is the Lazyload effect other than that everything works fine here for me. go to your cherry-parallax Plugin folder open cherry-parallax.php and mark out the line for mousewheel . you might need to do this on your theme files too. but after that the mouse scroll will comes back, but in my case laze load effect not working.

Fergas answered 1 year ago

I couldnt find any line reffering to mousewheel, can you be more specific?

Joe Vivona answered 1 year ago

OK – here’s a temporary the fix until Cherry can integrate the new versions, etc.   Lazy load will continue to work and parallax backgrounds will still scroll (but a little choppier)
In cherry-parallax plugin folder – disable smooth scroll 
/plugins/cherry-parallax/js
edit jquery.simplr.smoothscroll.min.js
comment out the jQuery(document).ready  function. above the definition of function(e)

Georgi answered 1 year ago

Hi Joe,
Just tried your solution, but still can’t scroll with the mousewheel. By disable smooth scroll in cherry-parallax plugin folder you mean comment out the wo_enqueue_script line for smoothscroll right?

Fergas answered 1 year ago

I fixed it, just go to wp-content / plugins / cherry-media-parallax / js / smoothing-scroll.js
delete all the code in smoothing-scroll.js and replace it with this code.

// Custom scrolling speed with jQuery
// Source: github.com/ByNathan/jQuery.scrollSpeed
// Version: 1.0.2
(function($) {

jQuery.scrollSpeed = function(step, speed, easing) {

var $document = $(document),
$window = $(window),
$body = $(‘html, body’),
option = easing || ‘default’,
root = 0,
scroll = false,
scrollY,
scrollX,
view;

if (window.navigator.msPointerEnabled)

return false;

$window.on(‘mousewheel DOMMouseScroll’, function(e) {

var deltaY = e.originalEvent.wheelDeltaY,
detail = e.originalEvent.detail;
scrollY = $document.height() > $window.height();
scrollX = $document.width() > $window.width();
scroll = true;

if (scrollY) {

view = $window.height();

if (deltaY < 0 || detail > 0)

root = (root + view) >= $document.height() ? root : root += step;

if (deltaY > 0 || detail < 0)

root = root <= 0 ? 0 : root -= step;

$body.stop().animate({

scrollTop: root

}, speed, option, function() {

scroll = false;

});
}

if (scrollX) {

view = $window.width();

if (deltaY < 0 || detail > 0)

root = (root + view) >= $document.width() ? root : root += step;

if (deltaY > 0 || detail < 0)

root = root <= 0 ? 0 : root -= step;

$body.stop().animate({

scrollLeft: root

}, speed, option, function() {

scroll = false;

});
}

return false;

}).on(‘scroll’, function() {

if (scrollY && !scroll) root = $window.scrollTop();
if (scrollX && !scroll) root = $window.scrollLeft();

}).on(‘resize’, function() {

if (scrollY && !scroll) view = $window.height();
if (scrollX && !scroll) view = $window.width();

});
};

jQuery.easing.default = function (x,t,b,c,d) {

return -c * ((t=t/d-1)*t*t*t – 1) + b;
};

})(jQuery);

Gerhard answered 1 year ago

I have tried this code but with the same result. Any other ideas?

I.V. Stalin answered 1 year ago

 At “smoothing-scroll.js” remove all and paste this:
jQuery(window).on(‘load’, function() {
if (jQuery(this).mousewheel) {
jQuery(this).mousewheel(handle);
jQuery(“body”).mousewheel(handle);
}
});
function handle(turn, delta) {
var time = 330;
var distance = 300;
jQuery(‘html, body’).stop().animate({
scrollTop: jQuery(window).scrollTop() – (distance * delta)
}, time);
return true;
}
May use as workaround until Cherry plugin official update.
Backup original, maybe this is not a good solution.

I.V. Stalin answered 1 year ago

Just copy from this source
https://jsfiddle.net/26kr9sm9/
At my comment above there are strange symbols after comment publishing.

Your Answer

20 + 10 =