Skip to content
Bug reportAug 22, 2026· 0:32· 13 views

Vue 3.5.x: v-model on <select> with Map option values picks wrong option

0:32 total

Comments · 0

Be the first to comment.

Bug report— by SceneRecap AI

mediumruntime-dom / vModelSelect / looseEqual
os: macOSapp: Vue SFC Playground (Vue @e2bede9)browser: Chromium 151.0.7922.34

Repro steps

  1. 1.Open Vue SFC Playground
  2. 2.Paste reproduction code setting up a `<select v-model="selected" size="2">` with options bound to `Map` instances (`mapA` with `[['id', 1]]` and `mapB` with `[['id', 2]]`), where `selected` is initialized to `ref(mapB)`
  3. 3.Inspect the rendered `<select>` element in the PREVIEW panel

Expected

Option B (id=2) should be visually selected and highlighted in the `<select>` element to match `selected = ref(mapB)`.

Actual

Option A (id=1) is visually highlighted/selected in the `<select>` element instead of Option B.

Evidence

visualIn the PREVIEW panel, 'Option A — id=1' is highlighted in the `<select>` element even though the model is initialized to `mapB` (`selected = new Map([['id', 2]])`)
Issue markdown (copy-paste ready)
### Description
When binding `v-model` on a `<select>` element with `<option>` values bound to `Map` instances, the wrong option is visually selected upon initial render. Even when initialized with `mapB` (`id: 2`), the select element highlights `mapA` (`id: 1`).

### Repro Steps
1. Open Vue SFC Playground (at 0.0s).
2. Bind `<select v-model="selected">` to options using `Map` objects as values:
   ```ts
   const mapA = new Map([['id', 1]])
   const mapB = new Map([['id', 2]])
   const selected = ref(mapB)
   ```
3. Observe the preview rendered `<select>` element (at 7.0s).

### Expected Behavior
`Option B — id=2` should be selected and highlighted.

### Actual Behavior
`Option A — id=1` is highlighted instead.

*Recorded with SceneRecap.*

Your recordings could explain themselves too.

Free plan · silent recordings welcome · bug reports included.

Try SceneRecap free
Vue 3.5.x: v-model on <select> with Map option values picks wrong option · SceneRecap