mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 07:04:31 +00:00
Pointer.stop would call event.preventDefault
if Pointer._stateReset
was true
, which is always true
after a State has changed and before Pointer.start has been called. However this broken interacting with DOM elements in the case where the State changes and you immediately try to use the DOM element without first having clicked on the Phaser game. An additional guard was added so preventDefault
will now only be called if both _stateReste
and Pointer.withinGame
are true (thanks @satan6 #1509)
This commit is contained in:
parent
42c75c0ad2
commit
aa2df803b7
2 changed files with 2 additions and 1 deletions
|
@ -146,6 +146,7 @@ Thanks to @pnstickne for vast majority of this update.
|
|||
* ArcadePhysics.moveToPointer no longer goes crazy if the maxTime parameter is given and the Sprite is positioned in a larger game world (thanks @AnderbergE #1472)
|
||||
* Sound.loop even when set for WebAudio wouldn't use the AudioContext loop property because Sound.start was being invoked with an offset and duration. Now if `loop` is true and no marker is being used it will use the native Web Audio loop support (#1431)
|
||||
* Timer.update was calling the TimerEvent callback even if `TimerEvent.pendingDelete` was already set to `true`, causing timer events to stack-up in cases where a new TimerEvent was generated in the callback (thanks @clowerweb #838)
|
||||
* Pointer.stop would call `event.preventDefault` if `Pointer._stateReset` was `true`, which is always `true` after a State has changed and before Pointer.start has been called. However this broken interacting with DOM elements in the case where the State changes and you immediately try to use the DOM element without first having clicked on the Phaser game. An additional guard was added so `preventDefault` will now only be called if both `_stateReste` and `Pointer.withinGame` are true (thanks @satan6 #1509)
|
||||
|
||||
For changes in previous releases please see the extensive [Version History](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md).
|
||||
|
||||
|
|
|
@ -601,7 +601,7 @@ Phaser.Pointer.prototype = {
|
|||
*/
|
||||
stop: function (event) {
|
||||
|
||||
if (this._stateReset)
|
||||
if (this._stateReset && this.withinGame)
|
||||
{
|
||||
event.preventDefault();
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue