cykod / Quintus

HTML5 Game Engine
http://html5quintus.com
GNU General Public License v2.0
1.41k stars 401 forks source link

Keyboard focus issue #89

Closed gvhuyssteen closed 10 years ago

gvhuyssteen commented 10 years ago

quintus_input.js ( Line: 160 )

Q.el.focus();

If you create a game on a website, this line of code automatically focuses the canvas and causes the page to scroll down to the canvas. I removed the line completely in http://ss14-team-61.divshot.io/ to get the desired effect.

If I could access the setup options from quintus_input.js, I could disable this if the page has a scrollbar.

.setup({ pagescroll: true })
cykod commented 10 years ago

Added a top-level option (defaults to true) to override you can do:

var Q = Quintus({ autoFocus: false})