phetsims / circuit-construction-kit-common

"Circuit Construction Kit: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
10 stars 10 forks source link

Going to a non-existent carousel page freezes sim #848

Closed KatieWoe closed 2 years ago

KatieWoe commented 2 years ago

Device Dell OS Win 11 Browser Chrome Problem Description For https://github.com/phetsims/qa/issues/772. May be related to https://github.com/phetsims/circuit-construction-kit-common/issues/844. There isn't a reason for doing this that I can think of, but since it causes a crash I'm still documenting. If you go to the element circuitConstructionKitDc.introScreen.view.circuitElementToolbox.carousel.previousButton.enabledProperty and enable the previous button while on the first carousel page, then try to go to a previous page, the whole page freezes with the below console error. Visuals

console

frozenstudio

arouinfar commented 2 years ago

Thanks @KatieWoe.

The solution here is the same as the solution to #844 -- carousel.nextButton.enabledProperty and carousel.previousButton.enabledProperty should be phetioReadOnly: true. I'll self-assign to open up the appropriate carousel design issue in sun.

@samreid I do not think there is any reason for the client to be messing with the enabledProperty of these buttons, so they are unlikely to run into any issues.

arouinfar commented 2 years ago

Design issue for carousel linked above, closing.