Skip to content

Waiting for next event cycle/DOM state change from JS interop in MAUI Blazor #10498

Answered by WesThompson
WesThompson asked this question in Q&A
Discussion options

You must be logged in to vote

Figured out why it is like that right after I posted this but can't seem to delete this post. Anyway, setting the height and removing the height were being applied at the same time because the callback of the requestAnimationFrame() method is set to run before the next repaint. That's why I need to wait two frames, so it will set the height in the first and remove it in the second. I'm still guessing this is not an issue in the WASM app because of the difference in event cycles for each of them or innate features of running in a real browser. So anyway, I guess calling it twice is the correct solution.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by WesThompson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant