Skip to content

Clearing select's value in change handler behaviour changed since 3.4.15 via webdriver #10505

Open
@dten

Description

@dten

Vue version

3.4.21

Link to minimal reproduction

https://play.vuejs.org/#eNp9Uk1P4zAQ/SuzvtBKkO5q91SllXYRh+VAEXACc4iSSWtwbMsfoVLIf2ds00IRkEMSz3sz8+Z5BvbXmKIPyOas9NgZWXlccgVQOpRYe+hPOt2gXHCWA0IrziJh9/QnWs3rTaXWSCT6NhJX6jQFOEu1qJo2MRP6SoZI+0nILVpdzjLwBe0X0VYKD1jlLAvJB0P9W22jPBAKMoQN5Q0DOBjHcmaIWc7eDUdHV1thPEgSSanecUapPkSq6Iy2Hgaw2MIIrdUdHJFDRzGx1sr51y5R6CKySuetUGt4BhWkXE7ie3rIxeaAene/nNzdE4erNqhc6tA5mEzn0GvRwBDnFC1M9l2LZA/8WCxSw2mmwL5VxgsT3OZjErUEGOPrY7VciysCyeFkz5IdkzU0RivWxYPTipYkteKs1p0REu0q3QvZN9+J4KySUj+dp5i3AY938XqD9eMn8Qe3jTHOLi06tD1tzR7zlV2jz/DZ9QVu6X8P0mIGSexvwCt0Woa8tJH2L0ST7TteUvs/3TldzI0723pUbjdUFJosS3zOaA9Ovxn9Te7v4s+r1SMbXwCvMCS3

Steps to reproduce

👋 sorry I can only reproduce this myself when acting on chrome with webdriver, but I have narrowed it down a lot

the basic premise is we have a strange select that clears its value on change, exampled in the repo link

The bug occurs when webdriver clicks the select and clicks one of the options within the value does not get cleared afterwards. If I click in the page myself it clears properly.

What is expected?

The value of the select afterwards should be null

What is actually happening?

it is whatever was selected last, ie 0 or 1

System Info

System:
    OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
    CPU: (32) x64 AMD Ryzen 9 5950X 16-Core Processor
    Memory: 55.80 GB / 88.39 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 18.16.1 - ~/.nvm/versions/node/v18.16.1/bin/node
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.1/bin/npm
  Browsers:
    Chrome: 122.0.6261.94

Any additional comments?

I have bisected the releases and found that this first happens from 3.4.15. I suspect the change is related to the select performance improvement 2ffb956

further i notice the commit introduces and _assigning field which changes the behaviour until the next tick. and wrapping the clearing call in nextTick works as a workaround in my instance.

  nextTick(() => { selection.value = null })

I suspect the issue relates to the fact that webdriver submits selection events in a slightly unusual manner. However I think that shouldn't mean this broke but it has

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions