Skip to content

Swapping ref attributes leads to a null in $refs #1834

Closed
@skirtles-code

Description

@skirtles-code

Version

3.0.0-rc.5

Reproduction link

https://jsfiddle.net/skirtle/ajrgdz84/6/

Steps to reproduce

  1. Open the console log.
  2. Click the Toggle button.
  3. Observe the logged $refs.

What is expected?

One of the $refs should be an HTMLInputElement (exactly which one depends on how many times you click the button).

What is actually happening?

Prior to clicking the Toggle button everything is fine. After clicking the button the HTMLInputElement is missing from the $refs and the relevant entry is set to null instead.


This may appear similar to #1789 but I believe it's different and the fix proposed in #1808 will only fix that issue, not this one.

The example I've provided here is somewhat contrived but I believe the usage is 'correct'. It does seem to function as expected against Vue 2.

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