angular-hotkeys icon indicating copy to clipboard operation
angular-hotkeys copied to clipboard

iframe binding issue

Open gauravlodha opened this issue 7 years ago • 3 comments

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?

gauravlodha avatar Oct 15 '18 12:10 gauravlodha

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

aramando avatar Oct 23 '18 12:10 aramando

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

gauravlodha avatar Oct 23 '18 12:10 gauravlodha

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.

aramando avatar Oct 24 '18 13:10 aramando