jQuery-slimScroll icon indicating copy to clipboard operation
jQuery-slimScroll copied to clipboard

bottom event not firing consistently

Open t2k opened this issue 8 years ago • 8 comments

not sure why... the top event is firing as expected. I'm using the latest version of jQuery 3.1.1

my page has a fixed top menu using the Bootstrap 3.3.x Fixed Header template. I have to use padding-top on the body element like so:

body { padding-top: 70px; }

Would that be having an effect on detecting and triggering 'bottom' event ?

Thanks for your help...

t2k avatar Dec 29 '16 22:12 t2k

Hi I have the same issue

@t2k did you find a solution to this?

Please, let me know

Thanks

juansebahler avatar May 13 '17 04:05 juansebahler

Hi

Both events are fired correctly with jquery version 1.1.9

The demo is with that version

http://rocha.la/jQuery-slimScroll

juansebahler avatar May 13 '17 04:05 juansebahler

at the line after comment // calculate actual scroll amount it should be percentScroll = parseInt(bar.css('top')) / (parseInt(me.outerHeight()) - parseInt(bar.outerHeight()));

without parseInt, the height is in float value and percentScroll never reaches 1 (means bottom).

linhntaim avatar Jun 01 '17 04:06 linhntaim

@linhntaim Thank you for your solution. It worked!

Maxith avatar Jan 10 '18 07:01 Maxith

@linhntaim Your solution did work. I think jQuery version does have something to do with it. It was working fine until I updated the jQuery in my project.

aamirMasood avatar Jan 18 '18 07:01 aamirMasood

Worked for me as well! Thanks! (I've also updated JQuery, so it definitely about it). Would be great to update the lib. A lot of opened pull request is in.

yrikturash avatar Mar 30 '18 11:03 yrikturash

@linhntaim The parseInt solution worked perfectly but i found another issue with event not reaching to bottom. The bottom event gets fire when i try to scroll from my mouse scroll button but when i try do by dragging the scrollbar with my mouse it doesn't fire any idea why this is happening?

DevVIN avatar Jun 12 '20 01:06 DevVIN

@linhntaim The parseInt solution worked perfectly but I found another issue with the event not reaching to the bottom. The bottom event gets fire when I try to scroll from my mouse scroll button but when I try to do by dragging the scrollbar with my mouse it doesn't fire any idea why this is happening?

I found the solution to this after debugging the slimscroll.js. In function scrollContent we have a variable i.e var maxTop = me.outerHeight() - bar.outerHeight(); this also needed be update with parseInt as below var maxTop = parseInt(me.outerHeight()) - parseInt(bar.outerHeight()); This has solved my event firing issue with scrollbar drag

DevVIN avatar Jun 15 '20 10:06 DevVIN