Closed Nancy-Salpepi closed 1 year ago
I'm going to be looking into this, I'm reproducing it on a Chromebook. Curiously, if the initial finger is NOT moving, the checkbox toggle works. @jessegreenberg is this type of behavior expected?
The seems strange, Ill take a look. Also, it seems to be less about keeping the finger still, but having the finger start over the molecule. If my finger starts right on top of the molecule even while moving this doesn't happen.
It could be related to https://github.com/phetsims/molecule-shapes/issues/213 and https://github.com/phetsims/molecule-shapes/commit/84eeb073e1e8762f7310fd340d18fe3f7af36b4a.
Specifically
// If a drag starts on a pair group, input should only be for dragging. Indicate to other listeners that
// behavior is reserved (specifically the pan/zoom listener that should not interrupt for pan).
if ( dragMode === 'pairExistingSpherical' ) {
pointer.reserveForDrag();
}
Should reserveForDrag
be used for other drag modes?
This patch seems to fix it, but I am not sure if it causes other problems:
Subject: [PATCH] Combine fireOnKeyDown and fireOnKeyUp options, see https://github.com/phetsims/scenery/issues/1520
---
Index: js/common/view/MoleculeShapesScreenView.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/common/view/MoleculeShapesScreenView.js b/js/common/view/MoleculeShapesScreenView.js
--- a/js/common/view/MoleculeShapesScreenView.js (revision c6224b3142ed391e1a6d46bff88d0a3783c7e2a0)
+++ b/js/common/view/MoleculeShapesScreenView.js (date 1677168252062)
@@ -229,11 +229,9 @@
const lastGlobalPoint = pointer.point.copy();
- // If a drag starts on a pair group, input should only be for dragging. Indicate to other listeners that
+ // input on the background should only be for dragging. Indicate to other listeners that
// behavior is reserved (specifically the pan/zoom listener that should not interrupt for pan).
- if ( dragMode === 'pairExistingSpherical' ) {
- pointer.reserveForDrag();
- }
+ pointer.reserveForDrag();
const onEndDrag = function( event, trail ) {
if ( dragMode === 'pairExistingSpherical' ) {
I believe the above commit fixes this. @Nancy-Salpepi can you test out master? (I've patched the release branches)
This changes how pan-zoom multi-touch works a bit.
@jessegreenberg would you be able to review https://github.com/phetsims/scenery/commit/7417b985d1daf1a812e7ec1eacdbb68907c66fdc?
This is working well now 🙂. I can rotate the molecule and check boxes/add bonds without an issue. I see what you are saying about still being able to zoom in, but I have to move the second finger in a way I wouldn't normally do after selecting an item. I probably never would have gotten it to happen if you didn't mention it.
@jessegreenberg, can you give this a look. We are otherwise ready for the next RC.
This change looks really good, thank you! The documentation is very helpful and I am very happy you found a way without adding a new Intent.
I do see one issue though - since only the background presses are checked listeners get interrupted for zoom for multitouch drag cases. For example, go to BASE and make both balloons visible. Drag both at the same time and the DragListeners will be interrupted for zoom. Ill look for a fix later today but will also hand back to @jonathanolson in case he sees the solution quickly.
@jonathanolson and I met to review https://github.com/phetsims/scenery/commit/7417b985d1daf1a812e7ec1eacdbb68907c66fdc together and addressed that bug in the above commit. This issue is no longer blocking, back to @jonathanolson to cherry pick this commit and next steps.
Patched in @jessegreenberg's bugfix above to the release branches, I'll proceed with RCs. Thanks!
Please close after verifying!
This looks good in rc.2 for full/basics versions. Closing.
Test device iPad 9th generation
Operating System 16.3.1
Browser safari
Problem description For https://github.com/phetsims/qa/issues/905, on the iPad, the behavior is different between the current rc and published when I am rotating a molecule by moving my finger around the screen and then go to press something else with another finger.
Steps to reproduce
Visuals This is the behavior in published:
https://user-images.githubusercontent.com/87318828/220941728-4a7c763a-f65a-4398-9fb0-45127a9bc95e.mov
This is the behavior in the current version:
https://user-images.githubusercontent.com/87318828/220941964-3a1236ba-b9bc-44d9-aa64-369650514b1a.mov