vuetifyjs / vuetify

🐉 Vue Component Framework
https://vuetifyjs.com
MIT License
39.69k stars 6.95k forks source link

[Bug Report] v-tabs would emit an input event twice #3560

Closed FFxSquall closed 6 years ago

FFxSquall commented 6 years ago

Versions and Environment

Vuetify: 1.0.7 Vue: 2.5.15 Browsers: Chrome 65.0.3325.146 OS: Linux x86_64

Steps to reproduce

  1. Put v-tabitem insidev-tabs
  2. Click tab
  3. input emit twice (see console.log)

Expected Behavior

input emit once

Actual Behavior

input emit twice

Reproduction Link

https://codepen.io/anon/pen/dmGPgQ?editors=1011

Other comments

need to fix "tabProxy" method

johnleider commented 6 years ago

You are using v-model in conjunction with an explicit @input listener. The result is expected.

FFxSquall commented 6 years ago

@johnleider Even if I do not hang a listener, the input event will still be called twice. Note the 'should update model when route changes' test in VTabs.spec.js. If you use toHaveBeenCalledTimes instead oftoHaveBeenCalled, you can see a problem. We already corrected similar behavior in #3494, than this case differs?

KaelWD commented 6 years ago

Fixed by #3561

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please direct any non-bug questions to our Discord