-
-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scroll Event Listener no longer works with 4.0.0-alpha.4 and above #313
Comments
You need to add the event listener to I can’t reproduce your claim that your version worked in 4.0.0-alpha.3; AFAIK it never has. |
Thanks @andersk that's good to know. I literally have a setup on my desktop using the same code as posted and toggling between 4.0.0-alpha.3 and 4.0.0-alpha.4 has it working, then not working, so perhaps I've been using a bad setup that somehow worked for a time. I'll update my stuff to point to |
Ok, can confirm the documented method works (whodathunkit?). I'll close this. Personal lesson for Friday: Read Documentation. |
Your fiddle with 4.0.0-alpha.6 directly replaced by 4.0.0-alpha.3: |
Hey, yeah unfortunately that was a breaking change of v4. |
The code in this report didn’t work in v3 either: |
I just noticed that the documentation states |
In the documentation, “ Although it’s true that the |
That's totally a mistake in the doc. I'll correct that right now. Thanks! |
Ah no @andersk is right :D that's very confusing tho! |
So no, the idea of the public interface was:
The |
Yeah, in my setup I've been making a reference to the |
@Grsmto There’s no way to do that with a declaratively instantiated SimpleBar ( |
@andersk no there is no "official" way of doing that but yeah I have been doing with the But yes that needs documentation, especially since that's the "recommended" way of instantiating SimpleBar. |
I think most of the arguments about why we might want to avoid custom DOM properties are presented here, and an argument I might add is better compatibility with static type systems. The cleanest alternative to the |
Current Behavior
Scroll Event Listener attached to the DOM element no longer fire in versions 4.0.0-alpha.4 and up.
Expected behavior
On releases versions 4.0.0-alpha.3 and prior the following would produce a console out put every time the content panel scrolled.
simplebarcontent.addEventListener( 'scroll', () => console.log('Scrolling'), false );
Reproducible example
Here's an example which should replace the text in the p with the timestamp of the scroll to show the event listener. In older versions this works, but not with the new alphas
https://jsfiddle.net/Lqzoa8cm/
Your environment
The text was updated successfully, but these errors were encountered: