Closed phet-steele closed 8 years ago
@phet-steele fun find....I doubt much can be done about this multitouch issue, but we will see what @pixelzoom says
When the "Check" button is pressed, the spinner arrows disappear, and interaction with them should cease - but it doesn't. This is a double bug in scenery-phet
, involving NumberPicker
(the "spinner") and FireOnHoldInputListener
.
When NumberPicker.setArrowsVisible(false)
is called (which hides the arrow buttons), the "fire-on-hold" interaction with the arrow buttons isn't canceled. So as long as you continue to hold down the arrow button, it will continue to change the value, even though the button is no longer visible. And FireOnHoldInputListener
(which handles the events) has nothing in its API to support canceling this interaction.
Since this affects all sims that use either of these common-code types, this issue should be moved to scenery-phet and addressed.
I don't think that it needs to be addressed for BCE 1.1.0-rc.1, since it's not a new problem, and rather obscure. @ariel-phet do you agree?
Looks like BCE is the only client of NumberPicker
that currently uses the setArrowsVisible
call.
@pixelzoom sounds good....lets mark this issue as "won't fix" and create an issue in scenery-phet
sun.PushButtonModel
has a similar fire-on-hold feature, but does not use FireOnHoldInputListener
. Looks like it properly handles stopping the associated timer when the button is disabled.
Thanks @ariel-phet, will do.
Issue moved to https://github.com/phetsims/scenery-phet/issues/212. Will not address this for BCE 1.1.0. Closing.
Related to RC test https://github.com/phetsims/tasks/issues/371.
Reopening this so that I can have @phet-steele verify after addressing phetsims/scenery-phet#212.
Fixed the issue in NumberPicker, tested ion iPad and desktop, demonstrated in: http://www.colorado.edu/physics/phet/dev/html/balancing-chemical-equations/1.2.0-dev.1/balancing-chemical-equations_en.html
@phet-steele Can you please verify this fix?
@pixelzoom works for me.
Thanks @phet-steele.
Probably not an obvious use case, but fun to report nonetheless @pixelzoom. In the game screens, with a multi touch device, the coefficient spinners can be held down while also checking an answer. This causes the inputted answer to change after the sim has checked for correctness. Easy way to reproduce some consequences of this:
Furthermore, if this procedure is done on the second attempt of an answer and "Show Answer" is pressed you get some points...sort of:
Video: https://drive.google.com/file/d/0B3HJopSo_QqLY1k4QXBBaFA0NkE/view?usp=sharing