dart-league/ng_bootstrap

preventDefault on events not working in IE11

Closed this issue · 1 comments

Hi,

I have been trying to make the bs-accordion work correctly on IE, but to no avail.

I have the same code as in the accordion example, only I just needed the version where you put the header inside header tag instead of in the heading property.

On Chrome FF and Safari, when I click the header, the accordion expands as expected, but in IE 11, it tries to redirect me to href="", which is not what I want.
The console shows Object doesn't support property or function preventDefault.
After browsing the internet, I found you need to check if preventDefault exists before using it, and if it doesn't, set retrunValue to false.
But I can't do that directly inside your code, and I'm not going to define custom events for every element that uses preventDefault...

What triggers me the most is that it works perfectly on your demo page. Why is that ? Do you have any ideas on how to fix this ?

Thanks !

I could not reproduce the issue