We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 587a7fb + ebea211 commit 24d17c7Copy full SHA for 24d17c7
js/rpg_core/TouchInput.js
@@ -256,6 +256,7 @@ TouchInput._setupEventHandlers = function() {
256
document.addEventListener('touchend', this._onTouchEnd.bind(this));
257
document.addEventListener('touchcancel', this._onTouchCancel.bind(this));
258
document.addEventListener('pointerdown', this._onPointerDown.bind(this));
259
+ window.addEventListener('blur', this._onLostFocus.bind(this));
260
};
261
262
/**
@@ -440,6 +441,15 @@ TouchInput._onPointerDown = function(event) {
440
441
}
442
443
444
+/**
445
+ * @static
446
+ * @method _onLostFocus
447
+ * @private
448
+ */
449
+TouchInput._onLostFocus = function() {
450
+ this.clear();
451
+};
452
+
453
454
* @static
455
* @method _onTrigger
0 commit comments