We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1aa35e commit 65b5a20Copy full SHA for 65b5a20
web/packages/extension/src/common.ts
@@ -111,7 +111,13 @@ class SelectOption implements OptionElement<string | null> {
111
}
112
113
function getElement(option: Element): OptionElement<unknown> {
114
- const label = option.getElementsByTagName("label")[0]!;
+ const element = option.querySelector<HTMLInputElement | HTMLSelectElement>(
115
+ "input, select",
116
+ )!;
117
+
118
+ const label = option.querySelector<HTMLLabelElement>(
119
+ `label[for="${element.id}"]`,
120
121
122
const [input] = option.getElementsByTagName("input");
123
if (input) {
0 commit comments