From 4b4234baaf537ff8e7fbca0f10b9ebf2ad4e0950 Mon Sep 17 00:00:00 2001 From: muendlein Date: Sat, 31 Jan 2026 23:12:21 +0100 Subject: [PATCH] avoid setWidth without any items --- src/scripts/choices.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scripts/choices.ts b/src/scripts/choices.ts index f15efa2b..f1550c0c 100644 --- a/src/scripts/choices.ts +++ b/src/scripts/choices.ts @@ -2305,7 +2305,10 @@ class Choices { if (this._placeholderValue) { this.input.placeholder = this._placeholderValue; } - this.input.setWidth(); + + if (this._placeholderValue || this._store.items.length > 0) { + this.input.setWidth(); + } } this._highlightPosition = 0;