Skip to content

DOM listeners haven't been removed when vm is destroyed, is this expected? #5187

Closed
@javoski

Description

@javoski

Vue.js version

2.2.1

Reproduction Link

https://jsfiddle.net/xujiongbo/jj7vatms/3/

Steps to reproduce

Open the link, click Pic1 delegate. (sorry about that the demo is a little complicated)

What is Expected?

2017-03-14 11 43 37

As the document says, all event listeners are automatically removed when vm is destroyed. Image load event should not been triggered after component Pic1 is destroyed and the click event on the outermost element of Pic1 should have been removed.

What is actually happening?

The image load event was triggered after component Pic1 is destroyed and the click event on the outermost element of Pic1 haven't been removed.

Is this a bug ? or I misread the document ?

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