Subscribe on changes!

Double emits (event and value) if child template is single root

avatar
Jun 11th 2022

Vue version

3.2.27

Link to minimal reproduction

http://jsfiddle.net/awgdu8xy/2

Steps to reproduce

  1. Go to JSFiddle
  2. Run, type something into the input and look at the console
    • Shows one emit (the value of the input)
  3. Remove the {{ value }} from the template
  4. Run, type something into the input and look at the console
    • Shows two events (Value of input, and the browser input event)

What is expected?

Consistency

What is actually happening?

Double emit

System Info

Tested in

* Firefox 100
* Firefox Dev edition 101
* Chrome 102

Any additional comments?

The {{ value }} part doesn't seem to matter specifically. It can be any other top-level DOM node. Wrapping the <input> in a div will still have the bug unless there is another root level element.