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

Prevent navigation to links in PDF file #5

Open
SimoneTosato opened this issue Mar 16, 2017 · 0 comments
Open

Prevent navigation to links in PDF file #5

SimoneTosato opened this issue Mar 16, 2017 · 0 comments

Comments

@SimoneTosato
Copy link

I'm currently working with your PDFWindow and it's great except I can't prevent the navigation to an external link when it's clicked. My code to prevent the navigation is

app.on('web-contents-created',function(ev,wc){
  wc.on('will-navigate',ev=>{
    ev.preventDefault();
    wc.stop();
  })
})

and it's working on every window except yours. Am i doing something wrong or this is actually a bug?

@SimoneTosato SimoneTosato changed the title Prevent redirect from links in PDF file Prevent navigation to links in PDF file Mar 16, 2017
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

1 participant