Skip to content

Add type="button" to toggle buttons... - #25859

Closed
franktopel wants to merge 1 commit into
twbs:v4-devfrom
franktopel:patch-1
Closed

franktopel wants to merge 1 commit into
twbs:v4-devfrom
franktopel:patch-1

Conversation

@franktopel

Copy link
Copy Markdown

... otherwise the according toggle buttons trigger a form submit if used inside a form element.

... otherwise the according toggle buttons trigger a form submit if used inside a form element.
<div class="card">
<div class="card-header" id="headingOne">
<h5 class="mb-0">
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already exists

@patrickhlauke

Copy link
Copy Markdown
Member

yes, those buttons all already have a type="button" attribute...

@franktopel

Copy link
Copy Markdown
Author

No, they definitely don't have it in the displayed sample code:

https://getbootstrap.com/docs/4.0/components/collapse/

grafik

@patrickhlauke

Copy link
Copy Markdown
Member

the live documentation is older than the current state of the repo.

again, this is already fixed in the repo. if you look closely at your PR, you'll see you're trying to add a second type="button"

#25643

@patrickhlauke

Copy link
Copy Markdown
Member

grafik

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

Successfully merging this pull request may close these issues.

3 participants