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

iframe binding issue #288

Open
gauravlodha opened this issue Oct 15, 2018 · 3 comments
Open

iframe binding issue #288

gauravlodha opened this issue Oct 15, 2018 · 3 comments

Comments

@gauravlodha
Copy link

gauravlodha commented Oct 15, 2018

My page loads under iframe tag and when focus goes on iframe or I click on the iframe, my shortcut combo does not work and if I click on the document or body or elsewhere except iframe my shortcut combo works smoothly. Please help me on this issue how do I resolve this? How do I bind hotkeys to iframe?

@aramando
Copy link

aramando commented Oct 23, 2018

So the Angular application, including the hotkeys stuff, is loaded inside an iframe, but it's only when the iframe does NOT have focus that the shortcuts work? That seems like the opposite of what I would expect.

See this issue

@gauravlodha
Copy link
Author

gauravlodha commented Oct 23, 2018

No not whole angular application only page like a book page loads under iframe but other things like button, panel are loads outside iframe.

@aramando
Copy link

OK, then the problem you have is pretty much exactly as described in the issue I linked to. It's not easy to fix, but if you want to try there are a couple of suggestions from the author of Mousetrap, the underlying library that angular-hotkeys uses. The easiest thing might be to stop using iframes, though, if possible, because they're always going to greatly complicate Javascript applications due to their security restrictions.

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

2 participants