Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue render option tag with empty value attribute without attribute #10412

Closed
ryinner opened this issue Feb 26, 2024 · 5 comments · Fixed by #10416
Closed

Vue render option tag with empty value attribute without attribute #10412

ryinner opened this issue Feb 26, 2024 · 5 comments · Fixed by #10416
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. has PR A pull request has already been submitted to solve the issue 🐞 bug Something isn't working regression

Comments

@ryinner
Copy link

ryinner commented Feb 26, 2024

Vue version

3.4.20

Link to minimal reproduction

https://play.vuejs.org/#eNp9kTFPwzAQhf+K5SUglWaAqaRIgDrAAAgYvYTk2ro4tmWf06Aq/52zrZQOqJt977t37+wDv7d23gfgC175xkmLzAMGeye07KxxyA7MwZqNbO1MxwpCi1uhhW6M9pFV0CC0bBmpi6K4JLEqsxN50AWhs6pGoBtjVW5g/VVnWlBLwScHwRNAiLEojWZ9rQIQQMJqsLGJjPAn12fsKyCT6GmsbsFRgr3EraFijeiqMpvkmWWeQZeqPEnDZxw9rbGWm/nOG01PcIi84I3prFTgXpOJF3zBkhK1Wimzf041dBRkqjdbaL7/qe/8EGuCvznw4HoQ/Khh7TaAWV59vMBA56NIDxQU0WfEd/BGhZgxYw9BtxT7hEtpn9JHSr359KsBQftpqRg0kmPiBafPfTyz+l/c6/lN6hN65OMvj0LCWQ==

Steps to reproduce

  1. Create select tag
  2. Create <option value=""></option>

What is expected?

<select>
  <option value=""></option>
</select>

What is actually happening?

<select>
  <option></option>
</select>

System Info

System:
    OS: Linux 5.15 Linux Mint 21.2 (Victoria)
    CPU: (12) x64 AMD Ryzen 5 5600G with Radeon Graphics
    Memory: 11.49 GB / 30.64 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 21.4.0 - ~/.nvm/versions/node/v21.4.0/bin/node
    Yarn: 1.22.21 - ~/.nvm/versions/node/v21.4.0/bin/yarn
    npm: 10.4.0 - ~/.nvm/versions/node/v21.4.0/bin/npm
    pnpm: 8.15.4 - ~/.nvm/versions/node/v21.4.0/bin/pnpm
    bun: 1.0.26 - ~/.nvm/versions/node/v21.4.0/bin/bun
  Browsers:
    Chrome: 121.0.6167.184
  npmPackages:
    vue: ^3.4.20 => 3.4.20

Any additional comments?

No response

@Vansinnesvisor
Copy link

I've the same issue.
It broke my select libs in production :(

@edison1105 edison1105 added 🐞 bug Something isn't working regression labels Feb 26, 2024
@edison1105
Copy link
Member

related commit ff130c4

@haoqunjiang haoqunjiang added 🔥 p5-urgent Priority 5: this fixes build-breaking bugs that affect most users and should be released ASAP. and removed 🔥 p5-urgent Priority 5: this fixes build-breaking bugs that affect most users and should be released ASAP. labels Feb 26, 2024
@haoqunjiang
Copy link
Member

While I understand that it is an unexpected result, I'm curious how this issue breaks your apps/libraries in real-world usage?

@ryinner
Copy link
Author

ryinner commented Feb 26, 2024

While I understand that it is an unexpected result, I'm curious how this issue breaks your apps/libraries in real-world usage?

Hi. An error occurs when working with the backend, which is written in more type-sensitive languages ​​like GO and php8, in my case. For example, I have an automatic typecast get params (id of database entity), which expect int or null, but now i receive:

http://example.com?enitityId="Select a value"

In my app it should throw an error - Expect nullable int, received string.

@Vansinnesvisor
Copy link

While I understand that it is an unexpected result, I'm curious how this issue breaks your apps/libraries in real-world usage?

https://github.com/jarstone/dselect/blob/main/source/js/dselect.js
For example.
The error occurs on line 122.

function isPlaceholder(option) {
    return option.getAttribute('value') === ''
}

Doctor-wu added a commit to Doctor-wu/core that referenced this issue Feb 27, 2024
@haoqunjiang haoqunjiang added has PR A pull request has already been submitted to solve the issue ❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. labels Feb 27, 2024
yyx990803 pushed a commit that referenced this issue Feb 28, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2024
lynxlangya pushed a commit to lynxlangya/core that referenced this issue May 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. has PR A pull request has already been submitted to solve the issue 🐞 bug Something isn't working regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants