kendo-ui-core
kendo-ui-core copied to clipboard
The Menu flickers on page load
Bug report
The Menu flickers on page load (i.e., when reloading the page, when navigating through the application pages).
Reproduction of the problem
Attached is a demo that replicates the issue. Because of the kendo.syncReady(function(){ ... }); that wraps the initialization script of the Menu, there is a delay in the widget rendering. Even with disabled styles, the behavior is the same.
Expected/desired behavior
The Menu should be rendered smoothly.
Environment
- Kendo UI version: 2024.1.130
- jQuery version: 3.5.1
- **Browser: [all]
The kendo.syncReady method is literally a $(document).ready() wrapper, so I do not agree that it causes the problem:
- https://github.com/telerik/kendo/blob/master/src/kendo.aspnetmvc.js#L30
The Menu's jquery demo also uses the $(document).ready() event, but the flickering does not reproduce:
- https://demos.telerik.com/kendo-ui/menu/index
The flickering is caused because in the wrappers the menu does a postback and the browser renders the page before it loads all CSS and JS files.
Attached is a modified sample where the Menu is configured with JS as the above jquery demo and the behavior is the same:
Increased priority due to a report in TicketID: 1641533
Priority increased: Ticket ID: 1688742