Prevent electron duplicate Window #776

Closed
opened 2026-01-29 16:48:20 +00:00 by claunia · 2 comments
Owner

Originally created by @AvinashSuresh12 on GitHub (Apr 5, 2022).

Originally assigned to: @GregorBiswanger on GitHub.

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"

Originally created by @AvinashSuresh12 on GitHub (Apr 5, 2022). Originally assigned to: @GregorBiswanger on GitHub. 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"
claunia added the bug label 2026-01-29 16:48:20 +00:00
Author
Owner

@danatcofo commented on GitHub (Apr 6, 2022):

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 commented on GitHub (Apr 6, 2022): 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.
Author
Owner

@GregorBiswanger commented on GitHub (Mar 28, 2023):

🎉🚀 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 commented on GitHub (Mar 28, 2023): 🎉🚀 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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#776