8000 Version 2.21.0 seems to have broken the click event on <b-badge> · Issue #6219 · bootstrap-vue/bootstrap-vue · GitHub
[go: up one dir, main page]

Skip to content
Version 2.21.0 seems to have broken the click event on <b-badge> #6219
< 8592 /div>
Closed
@CarnivalBen

Description

@CarnivalBen

Since v2.21.0, adding a click event to a <b-badge> component no longer works.

Example:

<div id="app">
  <b-badge style="cursor: pointer;" @click="clickme">Test</b-badge>
</div>
new Vue({
  el: "#app",
  methods: {
    clickme() {
      console.log("CLICKED!");
    }
  }
});

If I click the badge, nothing gets written to the console.

If I downgrade to bootstrap-vue v2.20.1 then the same code would output "CLICKED!" as expected.

If I modify the badge to use @click.native, this also seems to fix it.

Environment:

  • bootstrap 4.5.3
  • vue 2.6.12
  • bootstrap-vue 2.21.0

Demo: https://jsfiddle.net/bg100/0qmsgyoL/5/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0