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

BS5 events not firing #71

Open
5ulo opened this issue Jul 12, 2021 · 5 comments
Open

BS5 events not firing #71

5ulo opened this issue Jul 12, 2021 · 5 comments

Comments

@5ulo
Copy link

5ulo commented Jul 12, 2021

When hc-offcanvas-nav is included, I can't use BS5 eg. shown.bs.tab event.
Check the codepen for example. I added console.log on shown.bs.tab event and it does nothing. When I completely remove hc-offcanvas-nav plugin, everything works fine.

https://codepen.io/5ulo/pen/mdEVbWY

@5ulo 5ulo changed the title BS events not firing BS5 events not firing Jul 12, 2021
@5ulo
Copy link
Author

5ulo commented Nov 30, 2021

So the same is for any other events.. like show.bs.dropdown . The removeOriginalNav: true option doesn't help in this case. Any idea how to make those events working with hc-offcanvas-nav loaded?

@mrjamesriley
Copy link

mrjamesriley commented Jan 11, 2022

Hello, the issue here is also impacting the Sauce (SNPT) plugin, even when simply including the hc-offcanvas-nav JS, without performing any instantiation. Specifically the issue kicks in for us when the hc-offcanvas-nav.helpers.js is included as a script tag.

It's hijacking the clicks for our plugin, seeming due to it overriding the Node.prototype.addEventListener in its addRemoveListener. I'm not familiar enough with HC offcanvas yet, but it seems like it can be conflict with many other plugins by modifying any use of e.g document.addEventListener.

@sfritzsche
Copy link
Contributor

Same here on integrating into Magento 2. I agree with @mrjamesriley . The "EventListener" logic probably creates many problems.

@somewebmedia
Copy link
Owner

I'll have to re-write this or figure something else for capturing event listeners.

@coweb01
Copy link

coweb01 commented Jul 29, 2022

Hi, the issue also breaks bootstrap 5 modal events. hc-offcanvas is a very nice offcanvas menu and i would like to use it further. i have migrated my template to bootstrp 5. unfortunately it also partially destroys the bootstrap 5 events for me. does anyone have a workaround on how to get this running.

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

5 participants