使用 jQuery 自动完成时防止输入文本重置为默认宽度 ui

Prevent an input text to reset to default width when using jQuery autocomplete ui

我在这里使用基于 jQuery 自动完成 UI 的 Wordpress 插件: https://milesopedia.com/questions-reponses

我为输入文本元素设置了特定的宽度。不知何故,当输入文本被填充并在搜索过程中,它的宽度临时回退到默认值。

我尝试使用以下 class 更改宽度但没有成功:.ui-autocomplete-loading .ui-autocomplete-input .ufaq-text-input

我错过了什么?

设置输入宽度的

CSS 在 div 内,id 为 ufaq-faq-list。当您键入内容时,该元素会被另一个元素替换,因此您会丢失其中定义的所有样式。