From 5edee4a47887c892999cf25117618e5748293796 Mon Sep 17 00:00:00 2001 From: animena <59225072+animena@users.noreply.github.com> Date: Thu, 11 Jan 2024 13:06:59 +0000 Subject: [PATCH] check if there is value/option already selected before placing the placeholder in the input, to avoid the issue where it appears in the background of the input --- src/plugins/select/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/select/index.ts b/src/plugins/select/index.ts index 0bf800c..f72df4f 100644 --- a/src/plugins/select/index.ts +++ b/src/plugins/select/index.ts @@ -364,8 +364,10 @@ class HSSelect extends HSBasePlugin implements ISelect { private buildTagsInput() { this.tagsInput = document.createElement('input'); - (this.tagsInput as HTMLInputElement).placeholder = this.placeholder; + if (!this.value.length) + (this.tagsInput as HTMLInputElement).placeholder = this.placeholder; + if (this.tagsInputClasses) classToClassList(this.tagsInputClasses, this.tagsInput);