1

I am required to use the Hosted Fields solution from Global Payments. I include the javascript file in index.html and add the div's to the razor page. I make a call to JS Interop from the OnAfterRenderAsync in the razor page which configures and calls the cardform creation. However, the Hosted Fields don't display unless I do a Refresh or back button then forward or if I use developer tools to inspect, then the fields display.

I tried reloading the window, I'll take a flicker at this point. I have tried moving it to a separate component and setting a dummy field to force a state change. I have tried reload, refresh, reset the entire form, nothing. It only displays if I press F5 or go back a page and go into the page again or if I go to Developer Tools and Inspect. I expected to see the Hosted Fields.

What is strange is that I use this same Razor Class Library in .Net Maui Blazor Hybrid and it works fine, but if I use in the Blazor Web Assembly it doesn't work correctly.