input box update on keyboard left/right - skripting

muehi shared this problem 6 months ago
Not a Problem

I have the following slightly annoying problem:

I have created an activity with an input box and an update script (counting the number of inputs).

I have disabled the keyboard and right click of the mouse.


Upon clicking on the text of the input box and using the left and right keys the update script of the input box is being called.

Comments (4)

photo
1

Please post your .ggb file

photo
1

Sorry. ggb attached and activity via link:

The issue arises upon right clicking on the input-box text and using the left an right keyswww.geogebra.org/m/dzvdga6m

photo
1

Sorry, I don't see the problem here. Which browsers have you tried?


BTW


If[f(2) == g(2),If[f(1)==g(1), If[f(0) == g(0), If[n>1,
would be better as

If[f(2) == g(2) && f(1)==g(1) && f(0) == g(0) && n>1,
and
Execute[{"v=v+1"}]

as

SetValue(v, v+1)

photo
1

Thanks for the quick reply and comments.

Browser: Firefox, explorer


I am trying to count the number of inputs to the input box. However there are situations in which the Inputbox update script is called upon using the left and right keys of the keyboard. This increases the value of "v", without any new input to the input box.

The most natural solution would be to check if the input has changed. I guess i will do that.

© 2019 International GeoGebra Institute