Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

vscode-dropdown does not respect empty option values #327

@WebFreak001

Description

@WebFreak001

Describe the bug

When having a dropdown with an option with value set to the empty string, the empty value is not used, but the label of the option instead.

To reproduce

Test:
<vscode-dropdown id="testin">
	<vscode-option value="">Foo</vscode-option>
	<vscode-option value="val2">Bar</vscode-option>
</vscode-dropdown>
value:
<p id="testout"></p>
<script>
	var testin = document.getElementById("testin");
	var testout = document.getElementById("testout");
	testin.oninput = function() {
		testout.textContent = testin.value;
	};
</script>

Expected behavior

testin.value should be "" when selecting Foo, as this is how the HTML select dropdown behaves, but it's actually "Foo".

Desktop (please complete the following information):

  • OS Version: VSCode 1.63.2 on Electron 13.6.8 on ArchLinux i3 (X11)
  • Toolkit Version: v0.8.5

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions