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

Setting an <input> value to null is wrong #1576

Open
raystubbs opened this issue Nov 4, 2024 · 0 comments
Open

Setting an <input> value to null is wrong #1576

raystubbs opened this issue Nov 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@raystubbs
Copy link

raystubbs commented Nov 4, 2024

Describe the bug
Setting x.value = null, where x is an HTMLInputElement, results in a value with the string "null" instead of an empty string. All browsers I've tested (at least Chrome and Firefox) reset the value to an empty string when set to null.

To Reproduce
Steps to reproduce the behavior:

const x = document.createElement("input");
x.value = null;
// inspect x.value in the console, its value is "null"

Expected behavior
x.value should have an empty string instead of "null".

Additional context
happy-dom v15.8.0

@raystubbs raystubbs added the bug Something isn't working label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant