Skip to content

Commit f2de618

Browse files
committed
Touch Manager will now handle focus events as well.
1 parent 5623515 commit f2de618

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/input/touch/TouchManager.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,15 @@ var TouchManager = new Class({
174174
startListeners: function ()
175175
{
176176
var _this = this;
177+
var autoFocus = (window && window.focus && this.manager.game.config.autoFocus);
177178

178179
this.onTouchStart = function (event)
179180
{
181+
if (autoFocus)
182+
{
183+
window.focus();
184+
}
185+
180186
if (event.defaultPrevented || !_this.enabled || !_this.manager)
181187
{
182188
// Do nothing if event already handled

0 commit comments

Comments
 (0)