phetsims / sun

User-interface components for PhET simulations, built on top of Scenery.
MIT License
4 stars 12 forks source link

listBox still visible after panel/combobox visibleProperty set to false #845

Open Nancy-Salpepi opened 1 year ago

Nancy-Salpepi commented 1 year ago

Test device MacBook Air M1 chip

Operating System 13.3.1

Browser Safari

Problem description For https://github.com/phetsims/qa/issues/930, in studio on the Intro Screen: If a combo box is opened and then the visibleProperty is set to false, the list box will remain until you click elsewhere.

Note: It will not appear in the launched sim and it doesn't reappear after Reset All.

Steps to reproduce

  1. In Studio on the Intro Screen, Open the combo box for Block A
  2. Set blockAControlPanel.visibleProperty OR blockAControlPanel.comboBox.visibleProperty to false

Visuals

Screenshot 2023-04-25 at 11 56 31 AM Screenshot 2023-04-25 at 12 08 07 PM
Nancy-Salpepi commented 1 year ago

This seems like a common code issue because I was also able to produce this in Beer's Law and pH scale in master.

Screenshot 2023-04-25 at 12 15 59 PM
arouinfar commented 1 year ago

Thanks @Nancy-Salpepi. The orphaned ListBox definitely looks strange, and it's surprising that the child isn't respecting the parent's visibleProperty. I think it's worth some investigation, but I wouldn't consider it a publication-blocking issue since it doesn't manifest in State.

This seems like a common code issue because I was also able to produce this in Beer's Law and pH scale in master.

I also reproduced this in an older version of ph-scale (1.5), so this is not a new issue. @jonathanolson can you transfer this to the appropriate common repo?

Note: It will not appear in the launched sim and it doesn't reappear after Reset All.

This is expected. Transient behavior, such as an open ListBox, isn't saved in State.

jonathanolson commented 1 year ago

The list box is NOT a child of the ComboBox, so I wouldn't expect this. Perhaps it could be connected. Transferring to sun.