Skip to content

Commit 04b4740

Browse files
Armaan GuptaArmaan Gupta
authored andcommitted
added check for the label-element
1 parent 357ffb7 commit 04b4740

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

.cursor/mcp.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"mcpServers": {
3+
"Corp Jira": {
4+
"command": "docker",
5+
"args": [
6+
"run",
7+
"-i",
8+
"--rm",
9+
"--name",
10+
"corp-jira-rjilo",
11+
"--env-file",
12+
"/Users/armaang/.adobe-registry/mcp-servers/src/corp-jira/.env",
13+
"corp-jira"
14+
]
15+
},
16+
"Corp GitHub": {
17+
"command": "docker",
18+
"args": [
19+
"run",
20+
"-i",
21+
"--rm",
22+
"--name",
23+
"corp-github-unupd",
24+
"--env-file",
25+
"/Users/armaang/.adobe-registry/mcp-servers/src/corp-github/.env",
26+
"corp-github"
27+
]
28+
}
29+
}
30+
}

ui.frontend/src/view/FormFieldBase.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,11 @@ class FormFieldBase extends FormField {
166166
*/
167167
#syncLabel() {
168168
let labelElement = typeof this.getLabel === 'function' ? this.getLabel() : null;
169-
if (labelElement) {
169+
if (labelElement && labelElement.tagName?.toUpperCase() === 'LABEL') {
170170
labelElement.setAttribute('for', this.getWidgetId());
171+
} else if (labelElement) {
172+
//remove the 'for' attribute if it exists on non-label
173+
labelElement.removeAttribute('for');
171174
}
172175
}
173176

0 commit comments

Comments
 (0)