Properties
Similar Topics
Statistics
Comments
12
Participants
4
Subscribers
4
Votes
1
Views
1178
Share
Not a Problem
If a click on a button causes an input bar to appear exacly at the mouse position, the mouse click is evaluated twice and the input bar gets selected.
How can I deselect the input bar? The command SelectObjects() doesn't work since the second evaluation of the mouse click happens after the execution of the script. See attachment.
Please don't suggest to move my button away. For my purpose it has to be "under" the input bar.
GeoGebra Classic 5.0.587.0-d / Windows 10
Files:
Bug Double Eval...
- GeoGebra
- Help
- Partners
-
Contact us
- Feedback & Questions
- This email address is being protected from spambots. You need JavaScript enabled to view it.
- +43 677 6137 2693
© 2023 International GeoGebra Institute
Does it work better if you do
instead ofNo, that makes no difference.
The problem is that buttons in GeoGebra seem to react on the MouseDown-Event whereas input bars are activated on the MouseUp-Event. I think, any change to the OnClick handler of the button won't have an effect, because the input bar gets activated afterwards.
Its a bit annoying und for users unexpected: In my real applet, there are several input bars and it's confusing for the user why a certain input bar gets activated cause it looks like a hint to type there first.
Do you see another way to avoid this behaviour?
You could try making selection allowed false then true. Use SetFixed()
Why JS..?
workaround
create a polygon like button instead
you can use a text like button also
I was tinking in substituting all buttons by only texts, I do not know how to change the length of text with captions because I do not know how to get the length or value of a caption; but..... if the caption comes from a value the text can be the value of text like ""+nameofvalue
an example can help
Comments have been locked on this page!