question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

if call JSRuntime.InvokeVoidAsync("open", url,"_blank"); })) and close new tab then cannot press keyboard

See original GitHub issue

Describe the bug

Cannot Press Keyboard

Steps to reproduce (please include code)

`` @inject IJSRuntime JSRuntime public async Task OnClick() { JSRuntime.InvokeVoidAsync(“open”, anyNewUrl); }

``

Exceptions (if any)

Not Display Any Exception

Further technical details

  • AntDesign Version 0.12.0
  • dotnet --info .NET SDK (reflecting any global.json): Version: 6.0.400 Commit: 7771abd614

运行时环境: OS Name: Windows OS Version: 10.0.22000 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.400\

global.json file: Not found

Host: Version: 6.0.9 Architecture: x64 Commit: 163a63591c

.NET SDKs installed: 3.1.423 [C:\Program Files\dotnet\sdk] 5.0.411 [C:\Program Files\dotnet\sdk] 6.0.304 [C:\Program Files\dotnet\sdk] 6.0.400 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 3.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.28 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

  • IDE Rider 2022.2.3

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
yangpei1010110commented, Oct 15, 2022

I fix it just call

JS.InvokeVoidAsync("open",newUrl,"_blank","noreferrer");

then origin page will be not freeze

0reactions
ElderJamescommented, Oct 15, 2022

Pleaes add my wechat JamesYeungMVP, and jon our community

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I open a new window without using JS
At the top of your .razor file add @inject IJSRuntime JSRuntime;. And then use it like so await JSRuntime.InvokeAsync<object>("open", url, ...
Read more >
Blazor Open a page in a new Browser tab using navigation ...
Try JSRuntime.InvokeAsync to open in new tab. ... You can open pdf file directly via a tag. ... If the answer doesn't solve...
Read more >
Blazor WebAssembly: Link that opens page in new tab ...
I wrote a JS function that I invoke to open a URL in a new tab:- ... then the problem on the original...
Read more >
How do you close the browser window from a page in ...
The window.close() method closes the currently opened window. In the following example, open a new browser window and close it using the window.close()...
Read more >
Communicating between .NET and JavaScript in Blazor ...
To invoke JavaScript functions from Blazor, you need an instance of the IJSRuntime interface. You can obtain an instance using ASP.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found