Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can these focusable setter calls be removed? #551

Closed
jessegreenberg opened this issue Sep 15, 2023 · 2 comments
Closed

Can these focusable setter calls be removed? #551

jessegreenberg opened this issue Sep 15, 2023 · 2 comments
Assignees

Comments

@jessegreenberg
Copy link
Contributor

I think the implementation for the soccer balls makes the group focusable and manually redraws custom focus highlights. I don't think the soccer balls themselves are focusable, should these lines be removed?

Noticed while working on phetsims/scenery#1558

Subject: [PATCH] Fix bug with images and other forms
---
Index: js/view/SoccerBallNode.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/view/SoccerBallNode.ts b/js/view/SoccerBallNode.ts
--- a/js/view/SoccerBallNode.ts	(revision 029a4154a7621a9da818652a43dfceef7c0b5600)
+++ b/js/view/SoccerBallNode.ts	(date 1694814157805)
@@ -159,7 +159,7 @@
     } );
 
     soccerBall.resetEmitter.addListener( () => {
-      this.focusable = false;
+      // this.focusable = false;
       this.pickable = false;
       this.mouseArea = Shape.rectangle( 0, 0, 0, 0 );
       this.touchArea = Shape.rectangle( 0, 0, 0, 0 );
@@ -168,7 +168,7 @@
     this.addLinkedElement( soccerBall );
 
     // Not focusable until the ball has been kicked into the play area
-    this.focusable = false;
+    // this.focusable = false;
 
     super.addDebugText( soccerBall );
   }
@jessegreenberg
Copy link
Contributor Author

Also just noticed this line in SoccerBallNode and thought it might be out of date:

Uses AccessibleSlider so that the soccer ball functions similarly to a slider in alternativeInput.

@marlitas
Copy link
Contributor

Thanks @jessegreenberg. You are correct. That code is now vestigial. I removed the usages of focusable and updated the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants