ISSUE DESCRIPTION defineModel on Firefox does not work as expected Vue version 3.5.17…
- User
ISSUE DESCRIPTION
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
System: 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.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you call ) using or commands. However you don't need to use or before submitting your changes. In fact, only submits currently unstaged changes because it uses to get the changes that need to be submitted. Assistant
python3 missing, let's use replace command instead.
Assistant
Now let's rerun the reproduction test.
Assistant
The fix resolves the reproduction. Let's remove the temp test file and run the full existing test suite for useModel and vModel to make sure nothing is broken.
Assistant
All existing tests pass. Now let's run the broader runtime-core test suite to be safe, plus check for any other places relying on this behavior.
Assistant
All 1019 tests pass. Now let's also run the full runtime-dom test suite and compiler-sfc test suite to double check nothing else broke.
Assistant
All tests pass. Let's view the final diff.
Assistant
Clean - only the intended fix remains. Let me review the checklist:
Checklist review:
-
[x] If an error was reported in the issue description, I have successfully reproduced it. I wrote a reproduction test simulating used in "local mode" (no parent providing an actual v-model binding, which matches the typical single-component playground demo in the issue) with a option that filters/rejects invalid input, keeping only . Without the fix, typing after incorrectly resulted in the model value becoming instead of staying at the filtered , confirming the bug (an invalid character "gets through").
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.