Skip to content

Commit 0429506

Browse files
authored
remove readonly attr once element is ready for input (#31502)
1 parent b5b4a95 commit 0429506

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ui/lib/open-api-explorer/addon/components/swagger-ui.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,13 @@ export default class SwaggerUiComponent extends Component {
165165
}
166166

167167
updateDisabledFields() {
168-
document.querySelectorAll('.parameters :disabled').forEach((el) => {
169-
el.removeAttribute('disabled');
170-
el.setAttribute('readonly', true);
168+
document.querySelectorAll('.parameters').forEach((el) => {
169+
if (!el.disabled) {
170+
el.removeAttribute('readonly');
171+
} else {
172+
el.removeAttribute('disabled');
173+
el.setAttribute('readonly', true);
174+
}
171175
});
172176
}
173177

0 commit comments

Comments
 (0)