1 decade ago by Jack9
Put your pointer somewhere in the middle, over the canvas. Reload the application. Click. Your ig.input.mouse.x and ig.input.mouse.y will incorrectly read 0,0
Change small change to keydown in Input.js is all that's needed.
Change small change to keydown in Input.js is all that's needed.
keydown: function( event ) { if( event.target.type == 'text' ) { return; } var code = event.type == 'keydown' ? event.keyCode : (event.button == 2 ? ig.KEY.MOUSE2 : ig.KEY.MOUSE1); if( event.type == 'touchstart' || event.type == 'mousedown') { // FIXED this.mousemove( event ); } var action = this.bindings[code]; if( action ) { this.actions[action] = true; if( !this.locks[action] ) { this.presses[action] = true; this.locks[action] = true; } event.stopPropagation(); event.preventDefault(); } },