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

Update bootstrap-hover-dropdown for Bootstrap 5 #165

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

derek-ye
Copy link

Copy link
Contributor

@jrchamp jrchamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds compatibility for Bootstrap 5, but does this break backwards compatibility with any previous versions of Bootstrap that are currently supported? And by that I mean, "work with bootstrap-hover-dropdown". I do not mean "supported by Twitter".

Comment on lines +11 to +15


*/


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some blank lines snuck in!

Suggested change
*/
*/

@PetrDlouhy
Copy link

Maybe I have something misconfigured in my project, but I had to change line 119 to:

$parent.children(".dropdown-menu").addClass('show');

to make this work with Bootstrap 5.

And also I changed line 50 to:

if(!$parent.hasClass('show') && !($this.is(event.target) || $parent.is(event.target))) {

otherwise the hover action was unreliable.

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

Successfully merging this pull request may close these issues.

3 participants