phetsims / beers-law-lab

"Beer's Law Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/beers-law-lab
GNU General Public License v3.0
2 stars 9 forks source link

Changing locale using localeProperty can cause an open combo box to become misaligned #336

Closed Nancy-Salpepi closed 2 months ago

Nancy-Salpepi commented 2 months ago

Test device MacBook Air M1 chip

Operating System 14.5

Browser Safari, Chrome and Firefox

Problem description

While testing https://github.com/phetsims/qa/issues/1106 I noticed that changing locales while the combo box is open on either screen can cause the combo box to shift. Closing the box and reopening fixes the problem. The problem doesn't occur if the locale is changed while the combo box is closed.

This seems specific to Beer's Law and Concentration. I didn't see this issue with pH Scale or Molecule Scapes using studio.

Steps to reproduce

  1. Open Studio and go to the Concentration Screen
  2. Open the combo box
  3. Go to localeProperty and switch between ar_SA, ar_MA and ar while the box is open. (Another example is "zu" to "it")

Visuals

Screenshot 2024-07-11 at 9 33 03 AM
pixelzoom commented 2 months ago

@Nancy-Salpepi can you reproduce this in other sims, or is it specific to Beer's Law Lab?

I suspect that this is not specific to Beer's Law Lab and is a general issue with ComboBox. If that's the case, then this issue should be transferred to sun and assigned to @jonathanolson, who did the dynamic layout for ComboBox.

Nancy-Salpepi commented 2 months ago

I wasn't able to reproduce with other PhET-iO sims in the MR (see original comment). I just tried on main and I see that the issue is fixed.....which I should have checked. Sorry. Closing.

pixelzoom commented 2 months ago

Thanks @Nancy-Salpepi! I thought this looked familiar :)