Skip to content

Commit

Permalink
remove a11yClickInProgress, see #831
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Sep 28, 2018
1 parent 62b64e7 commit 8c86b66
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions js/listeners/PressListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ define( function( require ) {
this._fireOnHoldInterval = options.fireOnHoldInterval; // used for a11y
this._onAccessibleClick = options.onAccessibleClick; // used for a11y

// @private {boolean} - marks that the accessibility click listener is currently firing.
this._a11yClickInProgress = false;

// @private {boolean} - Whether our pointer listener is referenced by the pointer (need to have a flag due to
// handling disposal properly).
this._listeningToPointer = false;
Expand Down Expand Up @@ -557,7 +554,7 @@ define( function( require ) {
sceneryLog && sceneryLog.InputListener && sceneryLog.push();

// REVIEW: Why can't we interrupt an a11y click? That sounds very buggy!
if ( this.isPressed && !this._a11yClickInProgress ) {
if ( this.isPressed ) {
sceneryLog && sceneryLog.InputListener && sceneryLog.InputListener( 'PressListener#' + this._id + ' interrupting' );
this.interrupted = true;

Expand Down Expand Up @@ -614,9 +611,6 @@ define( function( require ) {
click: function() {
if ( this.canClick() ) {

// TODO: This can be deleted right? see https://github.com/phetsims/scenery/issues/831
this._a11yClickInProgress = true;

this.a11yClickingProperty.value = true;

// ensure that button is 'over' so listener can be called while button is down
Expand All @@ -629,8 +623,6 @@ define( function( require ) {
// call the a11y click specific listener
this._onAccessibleClick && this._onAccessibleClick();

this._a11yClickInProgress = false;

var self = this;
timer.setTimeout( function() {
self.a11yClickingProperty.value = false;
Expand Down

0 comments on commit 8c86b66

Please sign in to comment.