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

Slider is sticking #147

Closed ghost closed 6 years ago

ghost commented 6 years ago

Test Device

Hanson, MacBook Air

Operating System

Windows 10, macOS

Browser

Windows 10:

macOS:

Problem Description

For phetsims/QA/issues/118. Minor issue. I can get the slider to stick to the cursor.

Steps to Reproduce

  1. Left click on a slider thumb and then very quickly right click on the slider.
  2. Click outside of the simulation.

EDIT: Should have mentioned that I did this with a mouse.

Visuals

riaw

Troubleshooting Information Troubleshooting information (do not edit): Name: ‪Resistance in a Wire‬ URL: https://phet-dev.colorado.edu/html/resistance-in-a-wire/1.5.0-rc.3/phet/resistance-in-a-wire_all_phet.html Version: 1.5.0-rc.3 2018-04-26 19:12:59 UTC Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0 Language: en-US Window: 1280x606 Pixel Ratio: 2.5/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 Vendor: Mozilla (Mozilla) 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: {"assert":{"sha":"928741cf","branch":"HEAD"},"axon":{"sha":"cc053b4d","branch":"HEAD"},"brand":{"sha":"89d28f63","branch":"HEAD"},"chipper":{"sha":"54f17be2","branch":"HEAD"},"dot":{"sha":"0dd6ee8e","branch":"HEAD"},"joist":{"sha":"f047fb1b","branch":"HEAD"},"kite":{"sha":"b6071478","branch":"HEAD"},"phet-core":{"sha":"f35ff65e","branch":"HEAD"},"phet-io":{"sha":"d54be499","branch":"HEAD"},"phet-io-website":{"sha":"28284828","branch":"HEAD"},"phet-io-wrapper-classroom-activity":{"sha":"c84e3046","branch":"HEAD"},"phet-io-wrapper-lab-book":{"sha":"ebf7c7dc","branch":"HEAD"},"phet-io-wrappers":{"sha":"ce57c3e2","branch":"HEAD"},"phetcommon":{"sha":"a5a7478c","branch":"HEAD"},"query-string-machine":{"sha":"485e174e","branch":"HEAD"},"resistance-in-a-wire":{"sha":"6b2924cf","branch":"HEAD"},"scenery":{"sha":"64f0c409","branch":"HEAD"},"scenery-phet":{"sha":"42b0cff2","branch":"HEAD"},"sherpa":{"sha":"9c6ec322","branch":"HEAD"},"sun":{"sha":"6a7c923a","branch":"HEAD"},"tandem":{"sha":"7f499d9e","branch":"HEAD"}}
zepumph commented 6 years ago

I was able to reproduce this on Chrome Version 66.0.3359.181 (Official Build) (64-bit) too.

  1. left click then right click quickly on the slider
  2. left click outside the sim, like on the chrome top bar.
  3. slider will now be stuck, and the right click menu is not there.

@jonathanolson do you have any insight on this?

jonathanolson commented 6 years ago

I'll definitely investigate. Two questions first:

  1. Can I reproduce this with a touchpad (macOS)? Don't know if the quick-right-click is fast enough, or if it needs to start before the left click ends.
  2. Is this broken in master? Recent input work may have fixed this, since it seems related to my recent fixes.
ghost commented 6 years ago
  1. I'll be impressed if anyone *cough* @phet-steele *cough* can reproduce this issue with a trackpad.
  2. It seems to be broken in master.
zepumph commented 6 years ago

Let me know if there is anything else I can do to support or implement.

phet-steele commented 6 years ago

@lmulhall-phet this has been a general problem in all sims, thanks for being less lazy than me and logging it (@jonathanolson this is essentialy https://github.com/phetsims/molecule-shapes/issues/127 and the related issues).

Can I reproduce this with a touchpad (macOS)? Don't know if the quick-right-click is fast enough, or if it needs to start before the left click ends.

Two things:

ghost commented 6 years ago

Thanks, @phet-steele. I haven't been able to reproduce with a trackpad, but I would imagine doing so would require the System Preferences > Trackpad > Tap to click setting. Also haven't been able to reproduce without speed being a factor.

ghost commented 6 years ago

Not sure how useful this is, but I encountered some bizarre behavior with the Reset All button:

riawrb

jonathanolson commented 6 years ago

Hmm, the Chrome bug likely to have caused the molecules-and-shapes issue presumably would only happen in an iframe (https://bugs.chromium.org/p/chromium/issues/detail?id=269917).

jonathanolson commented 6 years ago

Hmm, we're not getting the pointerup/pointercancel events (bleh), but since we're setting pointer capture, we seem to be getting a lostpointercapture event. I'll need to look into whether this can reliably be used to fire a scenery-side cancel (and then we could potentially just flat-out ignore an "up" before a down).

jonathanolson commented 6 years ago

So I've opened https://github.com/phetsims/scenery/issues/803 in Scenery for this (because browsers are mean and don't give us matching down/up events). Unassigning here.

ariel-phet commented 6 years ago

Sure...this is a bit odd.

And...it is completely curable with a single click. I was able to reproduce the issue and get the cursor stuck, but a single click "unsticks" it.

This should not be a blocking issue for this release (this issue exists in the published version, and probably occurs in all sims as it is a scenery issue). I will discuss the scenery issue with @jonathanolson but marking this as "won't fix" and closing.