This is a migrated thread and some comments may be shown as answers.

DropDownList input flicker

1 Answer 57 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Aleks
Top achievements
Rank 1
Veteran
Aleks asked on 16 Mar 2021, 06:49 AM

The input tag used by DropDownList is sometimes briefly visible on the page while JavaScript and CSS assets are loading.

If the input tag is meant to be hidden anyway, why aren't you writing the style attribute out with the HTML from the tag helper?

Instead it's being set by the associated scripts, which means the input is visible until the script has loaded and run.

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 18 Mar 2021, 04:35 PM

Hello Aleks,

This behavior is know as flash of unstyled content (FOUC) and has been discussed in this forum thread: https://www.telerik.com/forums/how-to-fix-the-foucing-menu

You can try placing the component in an invisible container (e.g., a div) and show it on document.ready, or even later, for example once the DropDownList's dataBound event has fired.

With regard to our styles, we don't hide the input of the DropDownList initially, but you can do so by using the approach mentioned above.

Regards,
Ivan Danchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
DropDownList
Asked by
Aleks
Top achievements
Rank 1
Veteran
Answers by
Ivan Danchev
Telerik team
Share this question
or