Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by fugufish

so I have the game canvas on a page with a vertical scrollbar.

the game uses the Left, Right , Up and Down arrow keys.

I used

		ig.input.bind( ig.KEY.LEFT_ARROW, 'left' );
		ig.input.bind( ig.KEY.RIGHT_ARROW, 'right' );
		ig.input.bind( ig.KEY.UP_ARROW, 'up' );
		ig.input.bind( ig.KEY.DOWN_ARROW, 'down' );

and this prevented any vertical scrolling of the page. Perfect!

But it doesn't work on Opera 11. (Chrome,Safari and Firefox were ok.)

Any idea how to solve this?

1 decade ago by dominic

File a bug report with Opera software for not supporting event.preventDefault(). I've talked to some guys at Opera and it was promised to me ~4 month ago that they would fix it :/

There's nothing else you can do about that - other than binding some additional keys that don't have these side effects (e.g. WASD).

1 decade ago by dominic

Haha, good timing :)
<aho> opera 11.10 was released a few hours ago
<aho> they fixed that keydown/keypress cannot preventDefault issue

I just installed the update for Opera - it now prevents the scrolling like it should!
Page 1 of 1
« first « previous next › last »