Fix not disabling unsupported features in Settings dialog

This commit is contained in:
redphx
2024-10-02 07:17:17 +07:00
parent 9007663a3a
commit eed0aa9d9e
2 changed files with 6 additions and 6 deletions

View File

@@ -5045,11 +5045,11 @@ class SettingsNavigationDialog extends NavigationDialog {
_nearby: {
orientation: "horizontal"
}
}, $label = CE("span", { class: "bx-settings-label" }, label, note && CE("div", { class: "bx-settings-dialog-note" }, note), setting.unsupported && CE("div", { class: "bx-settings-dialog-note" }, t("browser-unsupported-feature"))), !setting.unsupported && $control), $link = $label.querySelector("a");
}, $label = CE("span", { class: "bx-settings-label" }, label, note ? CE("div", { class: "bx-settings-dialog-note" }, note) : prefDefinition?.unsupported && CE("div", { class: "bx-settings-dialog-note" }, t("browser-unsupported-feature"))), !prefDefinition?.unsupported && $control), $link = $label.querySelector("a");
if ($link) $link.classList.add("bx-focusable"), setNearby($label, {
focus: $link
});
$tabContent.appendChild($row), setting.onCreated && setting.onCreated(setting, $control);
$tabContent.appendChild($row), !prefDefinition?.unsupported && setting.onCreated && setting.onCreated(setting, $control);
}
setupDialog() {
let $tabs, $settings;