From 43b77cd2b7da66c90d76b855bf30653e05015538 Mon Sep 17 00:00:00 2001 From: Jonathan Olson Date: Wed, 5 May 2021 11:11:34 -0600 Subject: [PATCH] MultiListener patch for https://github.com/phetsims/energy-skate-park/issues/322 and https://github.com/phetsims/scenery/issues/1199 --- js/listeners/MultiListener.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/listeners/MultiListener.js b/js/listeners/MultiListener.js index 6e06cb96a..290ab4ef8 100644 --- a/js/listeners/MultiListener.js +++ b/js/listeners/MultiListener.js @@ -196,7 +196,13 @@ class MultiListener { sceneryLog && sceneryLog.InputListener && sceneryLog.InputListener( 'MultiListener background interrupt' ); sceneryLog && sceneryLog.InputListener && sceneryLog.push(); - this.removeBackgroundPress( this.findBackgroundPress( event.pointer ) ); + while ( this._presses.length ) { + this.removePress( this._presses[ this._presses.length - 1 ] ); + } + + while ( this._backgroundPresses.length ) { + this.removeBackgroundPress( this._backgroundPresses[ this._backgroundPresses.length - 1 ] ); + } sceneryLog && sceneryLog.InputListener && sceneryLog.pop(); }