preloadWindow makes dock icon always shows on macOS
Author: quanglam2807Created Sep 6, 2020Updated Jul 29, 2026
Description
On Electron 9.3.0. Setting preloadWindow to true will cause dock icon to be shown even if showDockIcon is set to false (default). It works correctly on Electron 9.2.1
Steps to Reproduce the Problem
const { menubar } = require('menubar');
const mb = menubar({
preloadWindow: true,
});
mb.on('ready', () => {
console.log('Menubar app is ready.', process.versions.electron);
});Expected Behaviour
Dock icon is hidden
Actual Behaviour
Dock icon is shown
Specifications
- Menubar version: 9.0.1
- Platform: macOS
- Electron version: 9.3.0
Other information
Source: max-mapper/menubar