Andersen27 / Photino.Blazor.Docking

Docking system for Photino.Blazor applications with split, tabs and floating panels support
MIT License
11 stars 2 forks source link

"Transient activation is required to request permission" #5

Closed pm64 closed 8 months ago

pm64 commented 8 months ago

Hey @Andersen27, you may be aware -- but just in case, the sample project is throwing on DockPanelHost.OnInitializedAsync() since the last commit. Here's the stack trace:

blazor.webview.js:1  Transient activation is required to request permission.
Error: Transient activation is required to request permission.
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
   at Photino.Blazor.CustomWindow.Services.ScreensAgentService.UpdateScreensInfo()
   at Photino.Blazor.CustomWindow.Services.ScreensAgentService.Initialize(IJSRuntime jsRuntime)
   at Photino.Blazor.Docking.Components.DockPanelHost.OnInitializedAsync() in C:\Photino.Blazor.Docking\Photino.Blazor.Docking\Components\DockPanelHost.razor:line 101
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

Please let me know if there's anything I can do to help resolve.

Andersen27 commented 8 months ago

Can you please check it on develop branch now? @pm64

Andersen27 commented 8 months ago

I think this is problem with webview permissions. My newest solution for different scaled monitors bug invokes window.getScreenDetails() function to get monitors info. This function requires "window-management" permissions to be granted.

Andersen27 commented 8 months ago

That was a bug in Photino.Blazor.CustomWindow project. I think i fixed it with package version 1.1.3. Photino.Blazor.Docking was updated to 1.1.1. Please check on the new version, if there is no error, I will close the issue. And thanks a lot for the report ;)

pm64 commented 8 months ago

Confirmed -- this has been resolved!

Thank you @Andersen27.