Skip to content
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

Error in menu.js #90

Open
bibhas2 opened this issue Feb 21, 2016 · 7 comments
Open

Error in menu.js #90

bibhas2 opened this issue Feb 21, 2016 · 7 comments

Comments

@bibhas2
Copy link

bibhas2 commented Feb 21, 2016

When I use the /template-app/index.html from the Electron's electron-quick-start app, I get this error upon startup:

menu.js:24 Uncaught TypeError: Cannot read property 'addEventListener' of null

The relevant portion in js/menu.js should be modified to this:

// Add the listener
document.addEventListener('DOMContentLoaded', function () {
  document.addEventListener('contextmenu', function (event) {
    menu.popup(remote.getCurrentWindow());
  })
})

Now the context menu opens fine.

Please let me know if you will like me to do a PR. Thanks.

@bibhas2 bibhas2 mentioned this issue Feb 21, 2016
@connors
Copy link
Owner

connors commented Feb 21, 2016

Is there a reason not to use Photon's provided quick start app from app.js? I feel like there will always be some conflicts there.

@bibhas2
Copy link
Author

bibhas2 commented Feb 21, 2016

Hi, not sure about what you mean by "Photon's provided quick start app". I am using the template-app that comes with the Photon distribution. The menu.js file there has this defect.

@AlhasanIQ
Copy link

same here , in menu.js line 24 .
looked for the .js-context-menu manually and couldn't find it

@ungoldman
Copy link

I believe this issue is a duplicate of #49

@wkoszek
Copy link

wkoszek commented May 2, 2016

@connors I'm seeing the same issue. Tried latest electron (pre-built binary).

@willkriski
Copy link

Same here over a year later, it's referencing .js-context-menu nowhere to be found in quick start app :)

@ungoldman
Copy link

@willkriski I think this project is no longer being maintained. Use at your own risk 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants