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

GroupSortInteraction: Should isKeyboardFocusedProperty consider isGroupItemKeyboardGrabbedProperty #866

Open
marlitas opened this issue Aug 19, 2024 · 2 comments

Comments

@marlitas
Copy link
Contributor

While working on phetsims/mean-share-and-balance#343 @zepumph and I discovered that there is an order dependency issue between isKeyboardFocusedProperty and isGroupItemKeyboardGrabbedProperty.

It seems odd to me that we can have intermediary states where the interaction can have something grabbed via keyboard, but not be focused and vice-versa. It might not be worth too much investigation as I believe it does create some catch-22 scenarios, but I do believe it can create unexpected results down the line.

This should not block MSaB.

@marlitas
Copy link
Contributor Author

FYI, that the assertion is now turned on again and working because of a fix for phetsims/mean-share-and-balance#343. However, it doesn't address the weird relationship between isKeyboardFocusedProperty and isGroupItemKeyboardGrabbedProperty. It just happened to be that the commit addressed a dependency collision through a different unrelated scenario.

@zepumph
Copy link
Member

zepumph commented Aug 20, 2024

This is hard for me to make progress on because I don't know how to reproduce the order dependency.

I was looking back at the git history of how we set the isKeyboardFocusedProperty and found c4adcfc. This isn't too helpful, but it shows that there is precedent for recognizing that the focus may change during the interaction, for better or worse, so it seems like depending on the more "modelly" isGroupItemKeyboardGrabbedProperty is best for logic determining other model entities, like the current selection.

Can you provide steps to reproduce the issue, or do you want to pair to continue on this issue?

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

2 participants