core icon indicating copy to clipboard operation
core copied to clipboard

Clicking on checkbox with @click-handler that impacts other checkbox will not check the clicked checkbox

Open arnesten opened this issue 1 year ago • 2 comments

Vue version

3.5.11

Link to minimal reproduction

https://play.vuejs.org/#eNqVU8FOwzAM/ZUoJ5CgExpcSjcB05DgAIhxjIS61tuypUmUpGNo6r/jJOtW0DSJU20/+/nZTrf0XutkXQNNaeag0iJ3MGSSkEzkUxDBRIdLXTsSHULct4YBo8UCitVUbRhtgfVlpUoQiM24sY7R3o7gMbietnfgzaZmSALpkWb/6GWhULJkNMZb/K4QvFjt4ZH3vKBuziRWxrY7ZQhmvc4qMlsYrl0QBxutjCMlzPJaOLKNlWXu8rPz1iPEgKuNPPiEhG2kxJkaLg7RKCwls1xYaMNNNJpdXgVuoUqbku3v6TpDdVvjvhbcJqEfGUTm27/U/tNgNOvtR6MX1FlknPF5srRK4nMInLh4VWkuwLxqx5W0jKKUyMNoLoT6eg6xzmi7Yx2JLy3eL0XjzYAFswZG95jLzRzwxXh4PHmBDdp7EC9dC8w+Ab6DVaL2GmPaQy1LlN3JC2qfKn9BLucfdrxxIG07lBcaFhPyGcV/YnRi9IPcfnId6phscIufazCeExfYT26Sqyva/ABwFwqe

Steps to reproduce

Click on checkbox with text "Second".

What is expected?

That the "First" checkbox is unchecked and that the "Second" is checked.

What is actually happening?

The "First" checkbox is unchecked, but the "Second" checkbox is still unchecked.

System Info

Chrome 129.0.6668.89. Ubuntu 22.04.

Any additional comments?

It works correctly in 3.4.38. But it stopped working in 3.5.0 and is not working in 3.5.11.

arnesten avatar Oct 10 '24 12:10 arnesten

Here comes another reproduction of the issue but with just one checkbox and

https://play.vuejs.org/#eNp9kk9P3DAQxb/KyBcWiSZFtJdtWLXdcmgPBQFHSyhkJ4vBsS3/CYuifHfGNl72gDjF8Xsz/s2zJ/bLmGoMyJascZ0VxoNDH8yKKwAxGG09TGCxhxl6qwc4IvPRD66i3mnlPAi3fsDuCTdwHo2LvpUOj8lSDJ0U3dOtGPDN8DWKUe6D6rzQCrrY4F7v1tG5OIYpqlReCquxlSGW/2k9Vko/L3L/maumztgE3HgcjCTHCiCqjWzvUaZJ6EcoE3xeA/gXg+eclXM5K8L4ZdAblKTtx+IsS8XyM2EdVCdqzmo6trjSFgyYMOrMkZkMHSH6WF2G42wVP0uYpoOo5rmp4y009X4qdsK8o0h7sa0enVZ0Zyko6qUHIyTaSxPjdJxRswzCWSulfv6X9rwNeFL2E/0H+4+O4ljS4sqiQzsS317zrd2iz/LFzX/c0XovUnBBkvsT8RqdliEyZtvvoDaEfeBLtH/TuxNqe+sudh6VK0NF0HTvyc8ZvcX1J6O/455V397ey0wp3o1oY08K8Kz6Xp2esvkV/gv6Ww==

Click on "Click me" checkbox. The time is updated, but the checkbox remains unchecked no matter how many times you click on it. It works correctly in 3.4.38, but stopped working in 3.5.0.

arnesten avatar Oct 10 '24 12:10 arnesten

a workaround

secondClick() {
  setTimeout(()=>{
    this.first = false;
  },0)
}

edison1105 avatar Oct 11 '24 01:10 edison1105