Skip to content
This repository was archived by the owner on Nov 7, 2019. It is now read-only.

Modal-header default closeButton has no type='button' causing forms to treat it as a submit incorrectly #57

Open
wanderingcoder2 opened this issue Apr 24, 2018 · 2 comments

Comments

@wanderingcoder2
Copy link

the default closeButton for modal-header renders as <button class="close" aria-label="Close Modal"><span aria-hidden="true">×</span></button>

can you please change the default to type="button" so it would be:
<button type="button" class="close" aria-label="Close Modal"><span aria-hidden="true">×</span></button>

When using forms this button is treated as a submit incorrectly because the type was never specified and the default for many browsers is 'submit'

@jquense
Copy link
Owner

jquense commented Apr 25, 2018

happy to take a PR!

@wanderingcoder2
Copy link
Author

wanderingcoder2 commented Apr 25, 2018

Ill try to get one that works i was having a difficult time figuring out how to assign properties to the button under the current architecture looking in both modal and dismiss areas and the bootstrap files, hopefully I will find a fix this weekend even if i have to re-architect a few things. If you have insights that would help I welcome them so a PR can get done faster, I am not as well versed as I would like with this project, that's why i posted a bug report figuring someone else may know how to do it already (and to make sure if i did find it a PR was ok).

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

No branches or pull requests

2 participants