You probably want to use kiosk mode for you main window, and also disable the DevTools.
Please refer to the new BrowserWindow() documentation:
options
Object (optional)
kiosk
Boolean (optional) – Whether the window is in kiosk mode. Default isfalse
.
webPreferences
Object (optional) – Settings of web page’s features.
devTools
Boolean (optional) – Whether to enable DevTools. If it is set tofalse
, can not useBrowserWindow.webContents.openDevTools()
to open DevTools. Default istrue
.
Adding these settings should work, you may want to give it a try:
mainWindow = new BrowserWindow
(
{
// [...]
kiosk: true,
webPreferences:
{
// [...]
devTools: false
}
}
);
CLICK HERE to find out more related problems solutions.