Creating a window with contextIsolation enabled does not enable contextIsolation in electron #995

Closed
opened 2026-01-29 16:54:07 +00:00 by claunia · 1 comment
Owner

Originally created by @NimbusFox on GitHub (Nov 6, 2025).

  • Version: 0.0.18

.net 9

  • Target: Linux and Windows (Issue was found on Linux)

In WindowManager.cs lines 128-144. If the X and Y values are -1 it uses the global json serializer else it will create a new serializer.

When it uses the global json serializer it fails to enable the contextIsolation and possibly other items as well. Where as if the X or Y value is not -1 it uses a local json serializer which passes along all the values as their defaults if they have not been set a value yet which triggers the options to be set correctly

Originally created by @NimbusFox on GitHub (Nov 6, 2025). <!-- Please search existing issues to avoid creating duplicates. --> <!-- Which version of Electron.NET CLI and API are you using? --> <!-- Please always try to use latest version before report. --> * **Version**: 0.0.18 <!-- Which version of .NET Core and Node.js are you using (if applicable)? --> .net 9 <!-- What target are you building for? --> * **Target**: Linux and Windows (Issue was found on Linux) <!-- Enter your issue details below this comment. --> <!-- If you want, you can donate to increase issue priority (https://donorbox.org/electron-net) --> In WindowManager.cs lines 128-144. If the X and Y values are -1 it uses the global json serializer else it will create a new serializer. When it uses the global json serializer it fails to enable the contextIsolation and possibly other items as well. Where as if the X or Y value is not -1 it uses a local json serializer which passes along all the values as their defaults if they have not been set a value yet which triggers the options to be set correctly
claunia added the bug label 2026-01-29 16:54:07 +00:00
Author
Owner

@FlorianRappl commented on GitHub (Nov 6, 2025):

Yeah sounds reasonable. Mind doing a PR?

@FlorianRappl commented on GitHub (Nov 6, 2025): Yeah sounds reasonable. Mind doing a PR?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#995