Skip to content

Prevent arrow and space keys from scrolling#11

Closed
sftrabbit wants to merge 1 commit intoincrepare:masterfrom
sftrabbit:master
Closed

Prevent arrow and space keys from scrolling#11
sftrabbit wants to merge 1 commit intoincrepare:masterfrom
sftrabbit:master

Conversation

@sftrabbit
Copy link
Contributor

When the exported game is contained in a page larger than the current
viewport (such as when hosted on Kongregate), the arrow keys and
space bar cause the page to scroll. To avoid this, prevent propagation
of these events.

The default behaviour must be prevented at the beginning of onKeyDown
because any key in the repeat key buffer will not be checked by
checkKey (so holding down keys would cause it to scroll).

When the exported game is contained in a page larger than the current
viewport (such as when hosted on Kongregate), the arrow keys and
space bar cause the page to scroll. To avoid this, prevent propagation
of these events.

The default behaviour must be prevented at the beginning of onKeyDown
because any key in the repeat key buffer will not be checked by
checkKey (so holding down keys would cause it to scroll).
@increpare
Copy link
Owner

cool, manually pulling this as we speak. thanks!

@increpare increpare closed this Nov 11, 2013
Auroriax referenced this pull request in Auroriax/PuzzleScriptPlus Nov 14, 2020
Fixes #11 Fixes #8
Right click and right drag are now a thing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants