bitwarden / passwordless-server

Bitwarden Passwordless.dev infrastructure/backend (API, database, Docker, etc).
https://bitwarden.com/
Other
86 stars 28 forks source link

PAS-380 | Fix lifecycle events for confirmation forms #676

Closed jonashendrickx closed 2 months ago

jonashendrickx commented 3 months ago

Ticket

Description

Blazor actually starts to render when DOMContentLoaded is fired. This doesn't mean the DOM is ready to execute our Javascript. We have disabled enhanced page loading, so that is not applicable to us. But it appears there is still a race condition that can be triggered.

https://learn.microsoft.com/en-us/aspnet/core/blazor/javascript-interoperability/static-server-rendering?view=aspnetcore-8.0

Shape

Screenshots

Checklist

I did the following to ensure that my changes were tested thoroughly:

I did the following to ensure that my changes do not introduce security vulnerabilities:

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 34.81%. Comparing base (62926dc) to head (d944e2a). Report is 6 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #676 +/- ## ======================================= Coverage 34.81% 34.81% ======================================= Files 566 566 Lines 30985 30985 Branches 926 926 ======================================= Hits 10788 10788 Misses 20055 20055 Partials 142 142 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.