Electron.NET icon indicating copy to clipboard operation
Electron.NET copied to clipboard

Prevent electron duplicate Window

Open AvinashSuresh12 opened this issue 3 years ago • 1 comments

Whenever doing any one of the below 3 actions in NavMenu page(NavLink), a new duplicate Electron window is popped up with the page selected. But In my application I would like to disable this behavior as I want only one window to be displayed all the time. Please let me know any fix for the issue.

1."Ctrl+Click" 2."Shift+Click" 3."Alt+Click"

AvinashSuresh12 avatar Apr 05 '22 10:04 AvinashSuresh12

Yah this hit me as well... very annoying. What I found was that i was using a pattern of <a href="#"></a> in many places and overriding the on click event to do my desired action. As soon as I removed the href="#" from the tag the behavior i desired occurred because the browser window didn't see the link as a valid link. We are ultimately in a browser window here with some extra features available so the rules of a browser window still apply. My search fu didnt find a better way to prevent this built in behavior. If you find a better way let me know.

danatcofo avatar Apr 06 '22 03:04 danatcofo

🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉

With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!

GregorBiswanger avatar Mar 28 '23 10:03 GregorBiswanger