Skip to content
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

jQuery.fn.hover() is deprecated #66

Closed
guestisp opened this issue Oct 18, 2018 · 7 comments
Closed

jQuery.fn.hover() is deprecated #66

guestisp opened this issue Oct 18, 2018 · 7 comments

Comments

@guestisp
Copy link
Contributor

jQuery-version of OverlayScrollbars is using hover method that is deprecated in jQuery.

}).hover(function() { //make sure both scrollbars will stay visible if one scrollbar is hovered if autoHide is "scroll".

This should be replaced with

}).on('mouseenter', function() { //make sure both scrollbars will stay visible if one scrollbar is hovered if autoHide is "scroll".
   if (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove) {
       _scrollbarsAutoHideFlagScrollAndHovered = true;
       refreshScrollbarsAutoHide(true);
   }
}).on('mouseleave', function() {
   if (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove) {
       _scrollbarsAutoHideFlagScrollAndHovered = false;
       refreshScrollbarsAutoHide(false);
   }
});
@KingSora
Copy link
Owner

I didn't know that the hover method is deprecated. I also can't find it in the official documentation.
Am I overlooking something?

@guestisp
Copy link
Contributor Author

I think they are still undocumented, but jquery-migrate is already triggering a warning
jquery/api.jquery.com#972

@KingSora
Copy link
Owner

You are right, I've found this regarding the documentation. Thanks for this issue! :)

@guestisp
Copy link
Contributor Author

Could you please release a new version with this fix ?

@KingSora
Copy link
Owner

Yes, the new version is coming next week with a few other fixes.

@KingSora
Copy link
Owner

KingSora commented Nov 7, 2018

@guestisp I apologize, but I couldn't manage it to release it earlier. Anyway, the new version is out: https://github.com/KingSora/OverlayScrollbars/releases/tag/v1.5.3

@guestisp
Copy link
Contributor Author

guestisp commented Nov 8, 2018

Thank you. Now i can pull the updated version automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants