ChubbRck Posted May 21, 2014 Share Posted May 21, 2014 Hi all, random problem here, wondering if anyone has had it - we're trying to develop a facebook game which consists of a Phaser app running in an iFrame. It all works great, but for some reason, the keyboard keys never register in IE10. We've tried ensuring the iFrame has focus, tried setting game.stage.disableVisibilityChange to false and to true, but cannot for the life of us figure out why the Phaser app can't control the keyboard from within an iFrame. Does anyone know if there's a way, maybe from the parent document, to allow Phaser to capture the keys? Thanks in advance, Nick Link to comment Share on other sites More sharing options...
cidicles Posted September 9, 2014 Share Posted September 9, 2014 Had the same issue this morning - this resolved it for me in IE11. <script type="text/javascript"> function setFocus() { var iframe = $("#game")[0]; iframe.contentWindow.focus(); } $(document).ready(function(){ setTimeout(setFocus, 100); });</script> Link to comment Share on other sites More sharing options...
Recommended Posts