radzenhq / radzen-blazor

Radzen Blazor is a set of 90+ free native Blazor UI components packed with DataGrid, Scheduler, Charts and robust theming including Material design and FluentUI.
https://www.radzen.com
MIT License
3.6k stars 802 forks source link

Radzen.Blazor.js Exception #1790

Closed Ezekiel768 closed 3 hours ago

Ezekiel768 commented 3 hours ago

Exception generated from line 20 in https://github.com/radzenhq/radzen-blazor/blob/master/Radzen.Blazor/wwwroot/Radzen.Blazor.js when load is on startup and document.fonts exists. This should wait for the document to be ready first. This causes the rest of the file to fail execution.

image

Issue stems from commit: https://github.com/radzenhq/radzen-blazor/commit/7e640f47a5bac0e6adf8f77d636b124b4df027e8

akorchev commented 3 hours ago

You should include the Radzen.Blazor.js file in the <body> and this error will not happen.

Ezekiel768 commented 3 hours ago

You should include the Radzen.Blazor.js file in the <body> and this error will not happen.

That's not standard, it should be in the head, not body. I've created a PR: https://github.com/radzenhq/radzen-blazor/pull/1791

This is a simple fix, pretty sure your response took longer.

akorchev commented 14 minutes ago

That's not standard, it should be in the head, not body

That is not true. The default Microsoft Blazor template includes the script in the <body>. As per our official instructions the script should be included after the blazor.web.js file.