2

I recently started working on a WordPress website that someone else setup. One odd thing I have found is that if you are running Chrome you can't scroll using your mouse - only the scroll bars on the side. Scrolling seems to work fine in Firefox and Safari.

Typically when I run into a problem like this it's either caused by the overflow or position css attributes, but after poking around I don't see any occurrences of those that would cause this problem.

Can anyone see why this might be happening or suggest other things to look at that might explain why it's not possible to scroll using ones mouse? Any idea why it would happen in Chrome but nothing else?

Liam
  • 6,517
  • 7
  • 25
  • 47
Abe Miessler
  • 82,532
  • 99
  • 305
  • 486
  • Works just fine for me, using my mouse. If this actually happens, either the `wheel` or `scroll` events are prevented, or it’s actually a different element that is scrollable. – Sebastian Simon Mar 03 '18 at 22:52
  • Oh that's really weird. What browser/OS were you using? – Abe Miessler Mar 03 '18 at 22:53
  • Firefox on Ubuntu. – Sebastian Simon Mar 03 '18 at 22:53
  • Very interesting. I just opened it in Safari/OSX and the scrolling does indeed work. Do you have Chrome installed? If so does it happen for you on there? – Abe Miessler Mar 03 '18 at 22:54
  • It also doesn't work on Chrome OSX for me – rpivovar Mar 03 '18 at 22:55
  • Without a doubt, the problem is in one of the loaded scripts. CSS is not to do with it. You can easily see this by debugging scripts of the page. As we can test, on onload wheel work correctly, but after load it fall – Max Wolfen Mar 03 '18 at 22:56
  • @MaxWolfen - sorry how do I test that the wheel works before the scripts load? I'm familiar with putting breakpoints in code and stuff like that but don't know how to prevent the scripts from loading at all to test. – Abe Miessler Mar 03 '18 at 23:03
  • 1
    Confirming: macOS: Chrome does not scroll, Safari does. – LinusGeffarth Mar 03 '18 at 23:16
  • `plugins.min.js` seems to set a `mousewheel` listener on `window` - if I remove that manually in dev tools, scrolling works again. – Siguza Mar 03 '18 at 23:25
  • @Siguza - how would I remove that using dev tools? I thought you could only do breakpoints etc? – Abe Miessler Mar 04 '18 at 00:01
  • 1
    @AbeMiessler [Like this](https://i.stack.imgur.com/4S6Zi.png). – Siguza Mar 04 '18 at 00:46
  • However, that's about the only way to remove the listener. It's an anonymous function and therefore it creates a new instance each time it is called. There is no easy way to remove it using code, as it can't be referenced. Check if the theme has a smooth scroll option and turn it off. If not, check if it has an update. I'm pretty sure other people are raging about this bug and most likely a fix has already been issued. – tao Mar 04 '18 at 00:55
  • Another way to remove it is go inside theme minified js and remove that function altogether, but that can easily go wrong. On a different note, I'd say your question is a duplicate of [this one](https://stackoverflow.com/questions/3106605/removing-an-anonymous-event-listener) with major difference being you haven't researched enough to realize that's what you're asking :). Cheers! – tao Mar 04 '18 at 01:01
  • Chrome doesn't allow me to use scroll wheel on any website right now. Possibly related to Logitech MX Mouse 2S. https://bugs.chromium.org/p/chromium/issues/detail?id=797708&desc=2 – Joe Phillips Mar 21 '18 at 14:11

4 Answers4

2

I guess this might be plugin or theme try to disable all plugins and then enable them one by one to identify the source of this problem.

See http://www.wpbeginner.com/plugins/how-to-deactivate-all-plugins-when-not-able-to-access-wp-admin/

If you still having the problem try to install this plugin

https://wordpress.org/plugins/mousewheel-smooth-scroll/#description

Also take a look here

https://wordpress.org/support/topic/my-website-not-scrolling-in-chrome-browser/

Liam
  • 6,517
  • 7
  • 25
  • 47
1

This bug is known for ages. As a user, you can disable "threaded scrolling" or "smooth scrolling" in flags to fix it. As a webdev, there is nothing you can do.

0

I have found this problem several times in old wordpress websites that used the original cherry plugin from templatemonster and the problem ended up being in every single case a plugin by the name of "Cherry Parallax Plugin". The problem to deactivate it is that the plugin code is old and unsupported and the "deactivate" link no longer works. The solution is going into the /wp-content/plugins/ directory and changing the name of "cherry-parallax" to something like "i_cherry-parallax" and then go back to the plugins page and select the deactivate link. Once the cache of the browser is refreshed then the page will start scrolling with the mouse wheel again.

DigitalDeath
  • 155
  • 1
  • 11
0

I had a Bootsrap 4 modal which wouldn't scroll in Chrome, this solved it:

.modal-dialog {
     pointer-events: auto !important;
}
Rmy5
  • 527
  • 8
  • 21