Skip to content

Function wiring broken for components that show/hide slot content using v-show #3556

@analog-nico

Description

@analog-nico

I reported the same issue for v-if which got fixed in [email protected]. However, with this version the same code using v-show – which previously worked perfectly – does not work anymore.

Vue.js version

2.0.0-rc.4

Reproduction Link

http://codepen.io/analog-nico/pen/KgPKRq

Steps to reproduce

  1. Click the link "Open popup using v-show"
  2. A badly designed popup opens
  3. Click the "Close" link

What is Expected?

  • The popup closes successfully

What is actually happening?

  • Vue fails to call an internal function and throws: TypeError: o.fn is not a function. (In 'o.fn(ev)', 'o.fn' is an instance of Object)
  • The closePopupUsingVShow function attached to the "Close" link's click event never gets called.
  • The popup does not close.

For reference the codepen contains the exact same implementation of the popup with the only difference that it uses v-if instead of v-show to show/hide the popup. v-if works perfectly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions