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

Highlights disappear after tabbing to radio buttons [chrome] #1605

Closed
Nancy-Salpepi opened this issue Feb 6, 2024 · 4 comments
Closed

Highlights disappear after tabbing to radio buttons [chrome] #1605

Nancy-Salpepi opened this issue Feb 6, 2024 · 4 comments

Comments

@Nancy-Salpepi
Copy link

Test device
MacBook Air M1 chip

Operating System
14.3

Browser
Chrome

Problem description
When zoomed in, while tabbing through controls, the highlight disappears once I focus on an item after a radio button group. It then reappears and disappears sporadically.
This was seen in Kepler's Laws 1.2.0-rc.1 but not in 1.2.0-dev.7. I also tested CAV on main and saw this issue on the Variability screen (but not on the first 2 screens where there are no radio buttons).

This issue doesn't happen with safari.

Steps to reproduce
Here is an example:

  1. Open Kepler's Law's on main
  2. On the First Law Screen zoom in.
  3. Tab through the controls--The focus will be lost when tabbing from the Speed radio buttons to the Zoom buttons (and then appear and disappear sporadically).

Visuals

radioButtonsFocus.mp4
@Nancy-Salpepi
Copy link
Author

tagging phetsims/keplers-laws#253

@jessegreenberg
Copy link
Contributor

Going through recent commits I found this starting happening after 1df1747 from #1289.

I also suspect this is related to #1507.

allowLayerFitting: true in HighlightOverlay fixes the issue but I don't know why. @jonathanolson should we commit this or is something else we should look into here?

Subject: [PATCH] Indicate that items have been sorted, see https://github.com/phetsims/scenery-phet/issues/815
---
Index: js/overlays/HighlightOverlay.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/overlays/HighlightOverlay.ts b/js/overlays/HighlightOverlay.ts
--- a/js/overlays/HighlightOverlay.ts	(revision 1a3d99132dde3e2f05c2646dfd290ddb7418ab48)
+++ b/js/overlays/HighlightOverlay.ts	(date 1707319759594)
@@ -185,6 +185,7 @@
 
     this.focusDisplay = new Display( this.focusRootNode, {
       allowWebGL: display.isWebGLAllowed(),
+      allowLayerFitting: true,
       allowCSSHacks: false,
       accessibility: false,
       interactive: false

@jonathanolson
Copy link
Contributor

This appears to be Chrome-only. I can't find a reason this would be happening (and Chrome's own report-out of the SVG indicates it shouldn't be buggy).

So the above commit is essentially a workaround for a Chrome issue (or a Chrome-specific thing). I think committing that would be good.

@zepumph
Copy link
Member

zepumph commented Feb 14, 2024

Alright thanks @jonathanolson. This common issue is solved, and I'll proceed with Keplers laws for testing of the bug and cherry picking.

@zepumph zepumph closed this as completed Feb 14, 2024
AgustinVallejo pushed a commit that referenced this issue Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants