Reduce width of controller-friendly select box if it has <optgroup>

This commit is contained in:
redphx 2024-10-29 16:56:34 +07:00
parent 392dc2cf86
commit 38211168e9

View File

@ -203,6 +203,11 @@ export class NavigationDialogManager {
$label = $parent.querySelector<HTMLElement>('div')!;
}
// Reduce width if it has <optgroup>
if ($select.querySelector('optgroup')) {
width -= 15;
}
// Set min-width
$label.style.minWidth = width + 'px';
$parent.dataset.calculated = 'true';