Open tylerc opened 1 year ago
This is caused by the form's input event being executed earlier than the select's change event.
changed=true
causes the component to be re-rendered and the select is reset. When the select's change event (v-model is based on the change event) is executed select is already back to its initial state. So chosen
is not changed. changed
is still true, the component is not re-rendered, and the v-model works normally.As you said. you should use the form's change event instead.
During the triggering process of the instruction, the updated hook of the component is triggered, thereby triggering the updated hook of the instruction, causing the instruction update to be reset. This has been fixed in #8639.
Vue version
At least 3.2.47 through 3.3.4
Link to minimal reproduction
https://play.vuejs.org/#eNp9U0GO2zAM/AqrS1ogtoFuT4Y3yO4+oMce6h7UmE7U2JIgUdkGhv9eylJSIwUKBLbImQyHFD2JF2vLS0BRi8YfnLK0azX+tsYRdNjLMBBMrQboJMmPn9IZwCEFp28RwOFk1AF9Dd83L5stbF7j423zY7sieNQ1RPhvTuojdjX0cvCY03N88YN/TXV3xAHhaAdJyBFAY5cXwNtNY5qy3LwoNFVirIjJQOTF0wPtQ1FwFWrp2wk10El52CttA8GgPKFGB5yyDvmvxDhC43HAA+2gM+hBG4JgeUi4gL1ynmlqxDLJftXDFWRPrBPxz7oDctc0AqWPSzIJwkUOAZOqIjgaxpwJx1NWemVPqoerCTDKcywXvabmQWk2K7st4AXdlSGWfjfu7NmRTl6KInXcGzfmHp9bkYcHz2wrYCvy1HKTcClG0+GwEOP07oSWGmNJGc0UVkwEXgUw/W0pWgH1Ga93KMZLj6vMbpoyHea5qZLkUoILVHnS6cKibz421X0hxFaoMW5sMUpb/vJG8zYvq9lmgD3wzWfHgtc9xq04EVlfV1XQ9nwsD2as9oxVLuh4c0Vnxv1T+VR+qTregXW6RD8WP5159+i4YCvy8i7abNfx9AuHukOH7r+1Hrjreg/QPzVvH4qY/wB360d1
Steps to reproduce
<select>
value to something else.What is expected?
Changing the
<select>
's value should work the first time, regardless of whether the<form>
element has aninput
event listener on it.What is actually happening?
The
<select>
element only accepts changes after the first try.System Info
Any additional comments?
Seems to only occur in Chromium browsers.