phetsims / resistance-in-a-wire

"Resistance in a Wire" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/resistance-in-a-wire
GNU General Public License v3.0
1 stars 4 forks source link

Sound blurs when dragging starts off of thumb #204

Closed KatieWoe closed 5 years ago

KatieWoe commented 5 years ago

Test device: Dell and Mac Operating System: Win 10 and 10.11 Browser: Chrome Problem description: For https://github.com/phetsims/QA/issues/239 It is possible to click on a part of the slider with the mouse and make the thumb jump to that position. If you start dragging the thumb the resulting sound is grainy and seems to blur together. Steps to reproduce:

  1. Move the resistivity thumb to the bottom of the slider
  2. Move your mouse (without the thumb) to the top of the slider
  3. Click and do not let go, the thumb will have jumped to your position
  4. Still clicking, drag the thumb up and down.

Troubleshooting information (do not edit):

Name: ‪Resistance in a Wire‬ URL: https://phet-dev.colorado.edu/html/resistance-in-a-wire/1.6.0-rc.2/phet/resistance-in-a-wire_en_phet.html Version: 1.6.0-rc.2 2018-12-13 16:36:32 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 Language: en-US Window: 1536x732 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: 16384x16384 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"928741cf","branch":"HEAD"},"axon":{"sha":"de77d4b5","branch":"HEAD"},"brand":{"sha":"1fd6682e","branch":"HEAD"},"chipper":{"sha":"fa2fbadf","branch":"HEAD"},"dot":{"sha":"bbbd8526","branch":"HEAD"},"joist":{"sha":"82521d0c","branch":"HEAD"},"kite":{"sha":"380cef53","branch":"HEAD"},"phet-core":{"sha":"1b90ac2f","branch":"HEAD"},"phet-io":{"sha":"38d7b161","branch":"HEAD"},"phet-io-wrapper-classroom-activity":{"sha":"246085c1","branch":"HEAD"},"phet-io-wrapper-hookes-law-energy":{"sha":"7479b0ec","branch":"HEAD"},"phet-io-wrapper-lab-book":{"sha":"c46f7839","branch":"HEAD"},"phet-io-wrappers":{"sha":"a6bc62ca","branch":"HEAD"},"phetcommon":{"sha":"cd63d89a","branch":"HEAD"},"query-string-machine":{"sha":"06ed6276","branch":"HEAD"},"resistance-in-a-wire":{"sha":"c996a2e3","branch":"HEAD"},"scenery":{"sha":"9953c5f7","branch":"HEAD"},"scenery-phet":{"sha":"15ed6d54","branch":"HEAD"},"sherpa":{"sha":"2cd50500","branch":"HEAD"},"sun":{"sha":"9ee72759","branch":"HEAD"},"tambo":{"sha":"65315b32","branch":"HEAD"},"tandem":{"sha":"ed8f8f1d","branch":"HEAD"}}
KatieWoe commented 5 years ago

Hard to record, so I showed @jbphet directly.

jbphet commented 5 years ago

I've implemented a fix for this, but I'm not sure it will be fully acceptable on master because it involves some changes to common code that I think other devs may want to address in a more general manner. I'll leave it open and assigned to me to follow up on how to propagate to master.

KatieWoe commented 5 years ago

This issue seems fixed on Win 10 chrome 1.6.0-rc.3

jbphet commented 5 years ago

Reopening because I'd like to discuss the fix with other devs. What I did was to make flags available for checking whether the slider thumb or track was being dragged, but this seems a bit hacky and I suspect that a similar situation may come up for other controls, i.e. where we want to be able to tell if the change to the control was done via mouse/touch versus keyboard interaction.

jbphet commented 5 years ago

This was discussed in the 1/10/2019 developer meeting, and it was pointed out that the scenery event could be used to distinguish between the different usage modes, but that event isn't being passed through to the startDrag and endDrag methods. An issue has been created to fix this deficiency in the slider, and once that's done I'll change the RIAW sim code to take advantage of the change.

jbphet commented 5 years ago

This is done. I handled it a little differently on the 1.6 release branch of RIAW than on master, since I had implemented a fix on that branch before I discussed the issue with the other devs, who provided an idea for a more general solution. The more general solution was done on master.