custom-electron-titlebar
                                
                                 custom-electron-titlebar copied to clipboard
                                
                                    custom-electron-titlebar copied to clipboard
                            
                            
                            
                        updateMenu should be public
This method is marked private:
private updateMenu(menu?: Menu) { }
But if you update the menu with wth Menu.setApplicationMenu(menu) then the commandId's have changed but this package does not know about the new commandId's. The result is that clicking any menu item does not work since they refer to non-existing commandId's.
If I run titlebar.updateMenu(menu) after setApplicationMenu, the commandIds are also updated and clicks work as expected.
You should use refreshMenu, an asynchronous method that refreshes the menu with what is in Menu.getApplicationMenu().