defineModel on Firefox does not work as expected Vue version 3.5.17 Link to minimal…
- User
defineModel on Firefox does not work as expected
Vue version
3.5.17
Link to minimal reproduction
Steps to reproduce
- Use firefox
- Enter anything in the field. It should be blocked and only show "a", but it wont on firefox.
What is expected?
It should only keep "a" and nothing else should "make it through"
What is actually happening?
Seems like either a race condition or firefox not updating at the same time as Chrome? no clue.
System Info
shellSystem: OS: Windows 11 10.0.26100 CPU: (20) x64 Intel(R) Core(TM) i5-14600K Memory: 12.60 GB / 31.77 GB Binaries: Node: 22.16.0 - C:\nvm4w\nodejs\node.EXE npm: 10.9.2 - C:\nvm4w\nodejs\npm.CMD Browsers: Edge: Chromium (134.0.3124.85) Internet Explorer: 11.0.26100.1882 -- Its not showing my actual browser: Firefox 139.0.4Any additional comments?
No response
Interface
No new interfaces are introduced.
- Assistant
I’ll trace the
defineModel/v-modelupdate path and existing browser-specific tests, then implement the smallest fix and run the focused suite. - Assistant
The workspace has no repository-specific agent instructions and is clean.
rgisn’t installed, so I’m using localgrep/findfallbacks; I’m also decoding the provided playground payload locally so the regression test matches the report exactly. - Assistant
The failure is a same-tick round trip: the native input first pushes the typed value, then the handler restores
"a". When the parent already held"a", its final state is unchanged, so no prop update reaches the child and the browser-mutated DOM can remain stale. I’m adding a regression around that exact controlled-model sequence and makinguseModelexplicitly invalidate the child when the emitted value returns to its current prop within the same tick. - Assistant
The new regression now exercises the failing path and the implementation reaches the corrective child render. One assertion needed the test renderer’s quoted string serialization; I’ve corrected that and am running the focused test, type check, and lint checks next.
- Assistant
The regression suite and lint pass. The direct TypeScript command rejected an incompatible flag because this is a composite project configuration, so I’m rerunning the repository’s supported type-check command and the broader runtime-core unit suite.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.