From e4c1e1a6b32c7770de71456a73df8af250480df7 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Sat, 24 Oct 2026 14:07:02 +0200 Subject: [PATCH] fix(ui): keep listbox panel width after live refresh Co-Authored-By: Claude Opus 5.5 --- resources/views/components/forms/listbox.blade.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/resources/views/components/forms/listbox.blade.php b/resources/views/components/forms/listbox.blade.php index 018e1bb5ba..a9e5533050 100644 --- a/resources/views/components/forms/listbox.blade.php +++ b/resources/views/components/forms/listbox.blade.php @@ -216,7 +216,14 @@ ); // Kept in state for the :style binding, because a Livewire morph resets the inline style. - this.panelPosition = { top: `${top}px`, left: `${left}px`, width: `${panelWidth}px` }; + // minWidth and maxWidth too: a fixed panel resolves the CSS min-width: 100% against the viewport. + this.panelPosition = { + top: `${top}px`, + left: `${left}px`, + width: `${panelWidth}px`, + minWidth: panel.style.minWidth, + maxWidth: panel.style.maxWidth, + }; this.positioned = true; }, }" x-modelable="value" :class="{ 'pointer-events-none opacity-70': saving }"