Fix not calculating controller-friendly <select>'s size when switching tab

This commit is contained in:
redphx
2024-09-25 20:20:06 +07:00
parent e69fa19ef3
commit f6ec6d7c9b
3 changed files with 41 additions and 19 deletions

View File

@@ -943,6 +943,11 @@ export class SettingsNavigationDialog extends NavigationDialog {
for (const $child of Array.from(this.$settings.children)) {
if ($child.getAttribute('data-tab-group') === settingTab.group) {
$child.classList.remove('bx-gone');
// Calculate size of controller-friendly select boxes
if (getPref(PrefKey.UI_CONTROLLER_FRIENDLY)) {
this.dialogManager.calculateSelectBoxes($child as HTMLElement);
}
} else {
$child.classList.add('bx-gone');
}