We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
A select element reports the text content of an option that has an empty value as its value, instead of the empty string.
To Reproduce
Execute the following in a Node.js repl:
let {GlobalRegistrator} = require('@happy-dom/global-registrator') GlobalRegistrator.register(); document.body.innerHTML = `<form> <select name="size"> <option value="">Please choose</option> <option value="s">S</option> <option value="m">M</option> </select> </form>` document.querySelector('select').value // => "Please choose"
Expected behavior
document.querySelector('select').value // => "" (empty string)
Screenshots
Device:
Additional context
In a browser or JSDom, this works as expected.
The text was updated successfully, but these errors were encountered:
fix: [capricorn86#1138] Modify option node to return empty string eve…
7a2c1b0
…n if the value is empty string
Merge pull request #1293 from t-wataru/master
efce30d
fix: [#1138] Modify option node to return empty string even if the value is empty string
No branches or pull requests
Describe the bug
A select element reports the text content of an option that has an empty value as its value, instead of the empty string.
To Reproduce
Execute the following in a Node.js repl:
Expected behavior
Screenshots
Device:
Additional context
In a browser or JSDom, this works as expected.
The text was updated successfully, but these errors were encountered: