d4nyll / smartscroll

jQuery plugin for scrolljacking and auto-hashing
https://d4nyll.github.io/smartscroll/
MIT License
257 stars 45 forks source link

Mouse wheel scrolling not working in Firefox #37

Open stljeff1 opened 7 years ago

stljeff1 commented 7 years ago

I cannot get smartscroll to work in Firefox. Specifically, I cannot scroll a page using the mousewheel.

Without knowing any more info, can anyone validate this problem? I feel the problem is on me, but I've tried all reasonable debugging tactics to no avail.

I've made sure that my HTML is solid - all tags open and close properly.

I've tried stripping away other js plugins but thats not helping.

I am hesitant in providing my code or a link, just because of privacy issues. My apologies for not providing more thorough documentation. However, if anyone has any GENERAL knowledge of this plugin breaking wheel scrolling in Firefox, I will appreciate it.

Thanks for the plugin and documentation!

stljeff1 commented 7 years ago

I solved my problem. I had two mistakes in my code.

One: I left out the lethargy plugin. From the documentation, in sounded like this was an optional plugin, so I left it out. I did not expect this decision to break the wheel scrolling in Firefox. I guess I should be more aware of what browsers use inertial scrolling?

Two: In at least one instance, I had changed the html so that I had no scrolling containers (for debugging purposes. I had left the "wrapper" class, so SmartScroll was finding the wrapper specified using the sectionWrapperSelector option, but did not find any sections. This broke the wheel scrolling in firefox and Chrome. So I ask, can the plugin fail silently when it doesn't find any sections?

d4nyll commented 7 years ago

Hey @stljeff1

  1. Lethargy should be optional. FYI, lethargy is device-dependent and not browser-dependent, and should have no effect on devices that does not use inertial scrolling. So it shouldn't break on just Firefox. Can you clarify for me what you mean by "cannot scroll a page using the mousewheel"? And if there are errors on the console, I'd be grateful if you can post the output.

  2. I assume users of smartscroll to have a section wrapper set, since it's used pretty much everywhere. I have not tested the scenarios where the section wrapper is not set, so I can't answer that question with certainty.

Thanks for reporting the issues, and I hope to resolve it soon!

stljeff1 commented 7 years ago
  1. If the section on the screen is a "smart scroll" section, ie - whatever defines sectionWrapperSelector - the wheel stops working. I can use the scroll bar, and I can press the middle mouse button to bring up a widget that will scroll the page according to mouse movement. But rotating the wheel definitely doesn't do anything.

So then, if i scroll away from the smart scroll section, the wheel works again, no problem.

no js errors to report.

I tried testing many things, including stripping away as much as I could in terms of vendor stuff. I took out everything but jquery and modernizr. it was only when i added lethargy that everything magically worked.

  1. was only meant as a suggestion :) ... i know i struggle testing all scenarios.
adrianrios25 commented 7 years ago

I have the same issue, I also tried the examples in firefox and it is not working.

kmwalsh commented 6 years ago

Also Firefox 57.0.3 on OSX 10.11.3 - spinning the scroll wheel did not scroll the page until I added Lethargy. I was able to click down with the wheel and use it that way, as well as use the scrollbar. Just the wheel-spin was broken. It was working in Chrome prior to the addition of Lethargy.

itsam commented 5 years ago

I also confirm this. When lethargy is included, the wheel in Firefox starts to work as expected. Quite strange!!!