mirror of
https://github.com/photonstorm/phaser
synced 2024-11-17 10:18:42 +00:00
Touch Manager will now handle focus events as well.
This commit is contained in:
parent
5623515c41
commit
f2de618b24
1 changed files with 6 additions and 0 deletions
|
@ -174,9 +174,15 @@ var TouchManager = new Class({
|
|||
startListeners: function ()
|
||||
{
|
||||
var _this = this;
|
||||
var autoFocus = (window && window.focus && this.manager.game.config.autoFocus);
|
||||
|
||||
this.onTouchStart = function (event)
|
||||
{
|
||||
if (autoFocus)
|
||||
{
|
||||
window.focus();
|
||||
}
|
||||
|
||||
if (event.defaultPrevented || !_this.enabled || !_this.manager)
|
||||
{
|
||||
// Do nothing if event already handled
|
||||
|
|
Loading…
Reference in a new issue