Permalink
Browse files

add focus by default. it avoid to explicitly click

  • Loading branch information...
1 parent a798cf7 commit 7492ffdb023238791c100e0854dfb46764504c4a @jeromeetienne committed Mar 4, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 plugins/keyboard/tquery.keyboard.js
@@ -8,7 +8,8 @@
if( !domElement ){
domElement = tQuery.world.tRenderer().domElement;
// make it focusable. needed to get keyboard evemt
- domElement.setAttribute("tabIndex", "0");
+ domElement.setAttribute("tabIndex", "0");
+ domElement.focus();
}
instance = instance || new THREEx.KeyboardState(domElement);
return instance;

0 comments on commit 7492ffd

Please sign in to comment.