Normally just select the item in the browser inspector, and style, but the second I tap ANYWHERE the autocomplete items disappear. Is there some way to persist them just for styling?
1 Answer, 1 is accepted
0
Nikolay
Telerik team
answered on 31 Jul 2025, 11:13 AM
Hello Steve,
You are correct—the AutoComplete suggestion popup closes automatically when it loses focus, which makes inspecting and styling the list items challenging. To keep the popup open while you work on your styles, you can temporarily prevent it from closing by handling the widget's close event and calling e.preventDefault().
Here’s how you can do this:
$("#autocomplete").kendoAutoComplete({
dataSource: ["Item1", "Item2", "Item3"],
close: function(e) {
// Prevent the popup from closing so you can inspect and style it
e.preventDefault();
}
});
With this setup, the popup will remain open even if you click outside of it, allowing you to inspect and apply custom styles using your browser’s developer tools. Once you finish styling, you can remove or comment out the close event handler to restore the normal closing behavior.
This approach is intended for development and inspection purposes only, not for production use.