Skip to content

[b-list-group-item] Button list group item defaults to "submit" type #2192

Closed
@craigholm

Description

@craigholm

When using the "button" option for a list group item, the rendered button does not have a type attribute. According to the HTML specs, button elements default to type "submit". When the list group is contained in a form, clicking one of these items will cause the form to submit (and trigger navigation if the default event handling isn't intercepted).

In this example, item 1 and 2 will cause the form to submit in addition to running their click handlers:
https://jsfiddle.net/3v1kurex/3/

The button component (b-button) defaults to type "button", and I feel this should be the default behavior of button list group items as well.

OS: Windows 10 64-bit
Browser: Chrome 70.0.3538.102 64-bit
Bootstrap-Vue version: 2.0.0-rc.11

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions