You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While experimenting with the Preline UI library using Blazor, I noticed that dropdowns stop working after navigation when using SSR mode.
To ensure reinitialization of Preline UI components after an enhanced navigation event, I used the following script as recommended in the Blazordocumentation:
However, in some cases, dropdowns still do not work.
Debugging Findings
After investigating the issue, I found that inside the open function in Preline UI, the dropdown fails to open due to the animationInProcess variable remaining true.
The issue arises because animationInProcess is true, causing the function to exit before opening the dropdown.
🔍 Steps to Reproduce
Enable SSR mode in Blazor.
Add a Preline UI dropdown component.
Trigger the dropdown to open.
Without explicitly closing the dropdown, navigate to a different page.
Attempt to open the dropdown after the navigation.
✅ Expected Behavior
The dropdown should work normally after navigation, as the autoInit function is called correctly.
❌ Actual Behavior
The dropdown does not open after navigation.
🛠 Environment
OS: Windows 11 (23H2 build SO 22631.4890)
Browser: Microsoft Edge 133.0.3065.92 (64 bit)
Blazor Version: 9.0.2
.NET Version: 9.0
Preline UI Version: 3.0.0
📄 Additional Context
If a minimal repro is needed I can share the project I've used to debug the issue. I don't know if this issue is caused on other frameworks as well. I'll try other components as well to check if this is an isolated issue or is this present on the other components as well
The text was updated successfully, but these errors were encountered:
Description
While experimenting with the Preline UI library using Blazor, I noticed that dropdowns stop working after navigation when using SSR mode.
To ensure reinitialization of Preline UI components after an enhanced navigation event, I used the following script as recommended in the
Blazor
documentation:However, in some cases, dropdowns still do not work.
Debugging Findings
After investigating the issue, I found that inside the
open
function in Preline UI, the dropdown fails to open due to theanimationInProcess
variable remainingtrue
.Code Snippet (Preline UI
open
function)The issue arises because
animationInProcess
istrue
, causing the function to exit before opening the dropdown.🔍 Steps to Reproduce
✅ Expected Behavior
The dropdown should work normally after navigation, as the
autoInit
function is called correctly.❌ Actual Behavior
The dropdown does not open after navigation.
🛠 Environment
📄 Additional Context
If a minimal repro is needed I can share the project I've used to debug the issue. I don't know if this issue is caused on other frameworks as well. I'll try other components as well to check if this is an isolated issue or is this present on the other components as well
The text was updated successfully, but these errors were encountered: