-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not Working on Production #144
Comments
when i click, it won't open anything....... |
We can't help if you don't provide more info :/ And also, you shouldn't ask for help here. I come from the electron.js discord server, there we can help you! This is only to track bugs and other stuff. |
well, this kinda looks like a bug, it works before building/packaging the app, but not afterward. |
for more information, I just did what it said on example, it works fine in the dev process |
We don't know which app isn't working or how we should repro this issue :/. Maybe create a repro gist or link your repo? |
well, the app is private, but the context menu (literally the example code) in the readme is not working on the production...... |
here is the code: const ctxMenu = require("electron-context-menu");
ctxMenu({
window: mainTab,
labels: {
copy: "📄 | Copy",
paste: "📋 | Paste",
cut: "✂ | Cut"
},
/* Context Menu Items */
menu: (actions, params, win, dicSuggestion) => [
/* Custom Buttons */
{
label: 'WinTube v'+version,
icon: path.resolve(__dirname, "..", "..", "src", "icons", "main-min.png"),
enabled: false,
},
{
label: 'Discord Server',
icon: path.resolve(__dirname, "..", "..", "src", "icons", "discord.png"),
click: () => open('https://discord.gg/GBDkr9T')
},
actions.separator(),
/* System Buttons */
actions.copy(),
actions.cut(),
actions.paste(),
actions.separator(),
/* Public Buttons */
{
label: "Exit",
icon: path.resolve(__dirname, "..", "..", "src", "icons", "shutdown.png"),
click: () => app.quit()
},
/* Dev Buttons */
{
label: 'Developer Tools',
icon: path.resolve(__dirname, "..", "..", "src", "icons", "dev-tools.png"),
click: () => mainTab.webContents.openDevTools(),
visible: isDev
},
]
});
it's on 'ready' event btw. |
Where is this code? Main thread? Renderer thread? |
app ready event is obviously on the main thread |
Are you sure you didn't install it as a dev dependency? |
hey, I build my app with
electron-builder
and the context menu is not working in the production, but it works fine in developments.The text was updated successfully, but these errors were encountered: