-
Notifications
You must be signed in to change notification settings - Fork 6
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
Selection Box drops down and to the right #152
Comments
I went back through all of the recent dev versions and it looks like this started happening between dev versions 1.5.1 and 1.5.2. Going to investigate each of the commits between those versions now. |
By changing the font size of the "Solute" label on SoluteComboBox to 12 instead of 22, I can avoid this behavior. Also, after I open and close the SoluteComboBox 3 times, it opens normally with long strings on the 4th time. |
@twant and I dove into this for a while. We mainly looked at ComboBox.moveListBox. We were unable to pin down anything concrete. You can reproduce this with stringTest=long in Molarity and in Beers Law lab. Furthermore, the longer the string the further away it gets from the button. When you then apply a The best way we found to reproduce this was to exchange The most curious part of this was that sometimes we found the following two lines of code to equal each other, and sometimes they were about 20px different. Either way, the listbox was always up and left from the buttons: const globalFromButton = this.localToGlobalPoint( new Vector2( this.button.left, this.button.top ) );
const globalFromListBox = this.listParent.localToGlobalPoint( new Vector2( this.listBox.left, this.listBox.bottom ) ); More random notes:
@jonathanolson could you provide a bit of feedback. It's quite possible that we are just looking in the wrong place, but when two calls of |
@twant and I worked on this again today. We didn't solve this generally, but we did find that removing the maxWidth from the list box parent solved this issue, and because of the scaling done on the list box by the combo box, we don't need the maxWidth for i18n (at least it looked good with |
Reopening, @pixelzoom said over in phetsims/sun#542 (comment):
Let's keep this open so that we don't think of that patch as "ready for production" |
How is reopening this issue going to keep someone from picking this "patch" up in a release branch? |
OK, now that I'm not trying to look at this on my phone, I see that 244e74e is specific to MolarityScreenView, so won't affect other sims. |
244e74e is an appropriate fix, see phetsims/sun#542 (comment). @zepumph feel free to re-close. |
@zepumph should this be closed or labeled "fixed-awaiting-deploy"? It should probably be tested by QA. |
Right. QA, when you get to this, you can close if all is good. |
Seems fixed on master |
Test device
Dell
Operating System
Win 10
Browser
Chrome
Problem description
For phetsims/qa#436. Not present in published version.
When stringTest is long, the box for selecting different solutes drops down instead of up, meaning several options are cut off. It also starts on the right near the button, so the reset button is covered up, instead of being in the same location as the original bar. Neither behavior is shown with the same string test in the published version.
Steps to reproduce
Visuals
Troubleshooting information:
!!!!! DO NOT EDIT !!!!!
Name: 12345678901234567890123456789012345678901234567890
URL: https://phet-dev.colorado.edu/html/molarity/1.5.0-dev.23/phet/molarity_en_phet.html?stringTest=long&dev
Version: 1.5.0-dev.23 2019-10-04 22:27:51 UTC
Features missing: touch
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36
Language: en-US
Window: 1536x722
Pixel Ratio: 2.5/1
WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium)
GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)
Vendor: WebKit (WebKit WebGL)
Vertex: attribs: 16 varying: 30 uniform: 4096
Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32)
Max viewport: 32767x32767
OES_texture_float: true
Dependencies JSON: {}
The text was updated successfully, but these errors were encountered: