parsajiravand / vue3-form-wizard

A vue3 based tab/form wizard
https://vue3-form-wizard-document.netlify.app/
31 stars 8 forks source link

Wizard step links error when CSP is used #25

Closed ptdev closed 4 months ago

ptdev commented 5 months ago

Hi,

First of all, thanks for this component. :heart:

Now I have found an issue when using it while also having a Content Security Policy in place (for instance, nuxt-security).

The CSP policy doesn't allow inline scripts, so since the tab step links use href="javascript:void(0)", everytime we click a tab step, we get a console error (even though the link still works and we go to the correct step).

Now, from our tests, changing the href link to # instead of javascript:void(0) appears to resolve this issue, but I'm not sure if that will affect any other functionality, so I'm just reporting it here for your information.

Cheers.

parsajiravand commented 5 months ago

Hello my friend, Thank for your report, I removed this code and you can check it on new version 0.2.4. Actually we don't need href="javascript:void(0)" attribute in <a> tag in vue. but if this chage has side effect on another part of our package please report.

ptdev commented 4 months ago

Hey!

Sorry for the delay answering this, but yes, I can confirm that after updating, we no longer get the CSP error.

Thank you ❤️