Jump to content

Game not registering when keys are released in IE11


Recommended Posts

Hi There,


I'm developing a simple game at the moment that requires the user to hold the right arrow key to move forwards or the left arrow key to move backwards. I have this code in my update loop as follows:

if(cursors.right.isDown){    //do forwards stuff here}else if(cursors.left.isDown){    //do reverse stuff here}                  

The problem is that occasionally the game appears to not recognise that the key is no longer down when I'm testing in Internet Explorer (the bug has never occurred in chrome) so the player continues to move. I tried removing the cursor functions and using jQuery events to accomplish the same movement but the bug still persists. 


Can anyone shed some light on resolving this issue?


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...