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

metismenu bootstrap code #153

Closed
719media opened this issue Dec 30, 2017 · 4 comments
Closed

metismenu bootstrap code #153

719media opened this issue Dec 30, 2017 · 4 comments

Comments

@719media
Copy link
Contributor

719media commented Dec 30, 2017

i just spent way too long debugging an issue I was having with metismenu.

It appears you have jquery method in your codebase, $.emulateTransitionEnd, which looks like it was lifted from bootstrap, perhaps version 3.3 or so. This same method exists in bootstrap 4, and has been slightly changed in the latest bootstrap 4 beta 3, which released a few days ago.

Anyway, your plugin is causing some issues because of the conflicting $.emulateTransitionEnd versions. I am able to work around this issue somewhat by loading the bootstrap later on in my build chain, so their version gets loaded last, but it still would be good to remove this issue entirely.

Is there any way you can just use a local copy of this function instead of extending jquery? I would think using a jquery function with the same name as such a popular library as bootstrap would be a good reason to switch.

Thank you for your time.

@ghost
Copy link

ghost commented Dec 30, 2017

Confirmed, menus break with Bootstrap Beta 3, would be grateful if anyone knows a fix.

@719media
Copy link
Contributor Author

719media commented Dec 31, 2017

I had a moment to write back about this. The main issue here is that bootstrap dropped support for IE 9, which removes the need for
https://github.com/onokumus/metismenu/blob/master/dist/metisMenu.js#L48-L53

and replaces
https://github.com/onokumus/metismenu/blob/master/dist/metisMenu.js#L73-L83
with

return {
  end: 'transitionend'
};

I'm not sure if you want metis menu to support IE 9, but if not, I would recommend making those changes. I would also recommend perhaps namespacing your $.fn.emulateTransitionEnd to something like $.fn.mmEmulateTransitionEnd (much like you've namespaced TRANSITION_END: 'mmTransitionEnd'), given that bootstrap is such a hugely popular library.

Thank you for your time

@719media
Copy link
Contributor Author

#154

@ghost
Copy link

ghost commented Dec 31, 2017

Genuis! all good now. Thank you.

@onokumus onokumus closed this as completed Jun 5, 2018
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

No branches or pull requests

2 participants