Skip to content

Commit

Permalink
Handle disabling settings without label
Browse files Browse the repository at this point in the history
  • Loading branch information
CendioOssman committed Aug 8, 2024
1 parent c6606a5 commit 84897fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -818,13 +818,17 @@ const UI = {
disableSetting(name) {
const ctrl = document.getElementById('noVNC_setting_' + name);
ctrl.disabled = true;
ctrl.label.classList.add('noVNC_disabled');
if (ctrl.label !== undefined) {
ctrl.label.classList.add('noVNC_disabled');
}
},

enableSetting(name) {
const ctrl = document.getElementById('noVNC_setting_' + name);
ctrl.disabled = false;
ctrl.label.classList.remove('noVNC_disabled');
if (ctrl.label !== undefined) {
ctrl.label.classList.remove('noVNC_disabled');
}
},

/* ------^-------
Expand Down

0 comments on commit 84897fd

Please sign in to comment.