Skip to content

Clicking on a BTab within a BForm causes page to reload #2739

Closed
@hackel

Description

@hackel

Describe the bug

This one took some serious debugging to isolate, it wasn't obvious at all. So I have a set of BTabs within a BForm, and whenever I click on one of the tabs, the entire page reloads. No warnings, error messages, nothing. Just a hard reload. I think that what's actually happening is, clicking on the BTab (a button element) is actually causing the form to submit, but since there's no action specified, it just "submits" to the current page, causing a reload. I can successfully work around this by adding @submit.prevent to the BForm. I suspect that simply adding type="button" to the BTab buttons would fix this issue.

Reproduction

https://stackblitz.com/edit/github-lg51uvtf?file=src%2Fcomponents%2FComp.vue

Used Package Manager

npm

Edit: Confirmed that by adding :title-link-attrs="{ type: 'button' }" to all BTabs it does fix this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions