phetsims / number-play

"Number Play" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
3 stars 1 forks source link

Issues when holding object while changing scenes #173

Open Nancy-Salpepi opened 2 years ago

Nancy-Salpepi commented 2 years ago

Test device iPad Air 2

Operating System 15.5

Browser safari

Problem description I noticed a couple of issues with multitouch when I am holding an object or button with one finger while changing scenes with another. For example, when holding a puppy card and changing from the locked scene to another one, the ones card will still move around when I move my finger (even though the puppy card may no longer be there).

Steps to reproduce

  1. On the tens screen, add all 10 dogs to the play area
  2. Switch to the locked scene (scene 3)
  3. while holding one of the puppy cards, change to either scene 1 or 2
  4. Without lifting your finger, move it around (even though there may no longer be a card under it)

Visuals

https://user-images.githubusercontent.com/87318828/170276524-6791f021-8d51-4f07-9a0d-59c4f6c3b6c5.mov

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Number Play‬ URL: https://phet.colorado.edu/sims/html/number-play/latest/number-play_en.html?readAloud Version: 1.0.3 2022-05-24 03:06:35 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Language: en-US Window: 1257x694 Pixel Ratio: 2/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: 31 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}
Nancy-Salpepi commented 2 years ago

A second example: If I hold a card containing multiple objects over the collection area and switch from scene 2 to scene 1, those cards will not return to collection area when I lift my finger.

  1. On the Tens screen, add all 10 puppies to the play area
  2. Switch to scene 2
  3. Combine puppies so that 3 are on the same card
  4. Hold card over collection panel while switching to scene 1 with another finger
  5. Let go of objects --they will remain "above" the collection panel

https://user-images.githubusercontent.com/87318828/170280074-7913afa5-011d-4052-a33d-32519b8c17f5.mov

pixelzoom commented 1 year ago

Changing the radio buttons should interrupt all interactions with objects in the left/right accordion boxes. Probably by adding something like this in NumberPlayScreenView.ts:

    // If the GroupAndLinkType changes, interrupt interaction with objects in these accordion boxes.
    model.objectsGroupAndLinkTypeProperty.link( () => {
      onesAccordionBox.interruptSubtreeInput();
      this.objectsAccordionBox.interruptSubtreeInput();
    } );
chrisklus commented 1 year ago

Adding blocks-sim-publication label to indicate this should be completed before starting dev testing. Since this is multitouch, it's not essential, but it sounds like @pixelzoom has a lead in https://github.com/phetsims/number-play/issues/173#issuecomment-1386434259.

pixelzoom commented 1 year ago

Addressed as I described in https://github.com/phetsims/number-play/issues/173#issuecomment-1386434259. @chrisklus please review.

chrisklus commented 1 year ago

Thanks @pixelzoom, changes look good. Testing on my phone via phettest, all related problems seem fixed except what @Nancy-Salpepi described in https://github.com/phetsims/number-play/issues/173#issuecomment-1137281403. Since it's not causing any issues with the sims usability, I'm inclined to not fix it at this time. Marking this issue as deferred.

chrisklus commented 1 year ago

For https://github.com/phetsims/number-suite-common/issues/72