Pasting in input boxes

Report bugs. Post bug workarounds or fixes

Moderator: MSandro

Post Reply
mdave16
Posts: 1
Joined: Jul 22nd, '17, 11:08

Pasting in input boxes

Post by mdave16 » Jul 22nd, '17, 11:20

I imagine the problem holds in greater generality, but you can paste things that should not be there into input boxes and this *could* lead to more breakages?

# What is wrong?

If there is an input box which is number only, you can still paste other characters in.

# How to recreate error?

Go to operators and bring out an addition block or an "is it prime" block. Now open a text editor and write any character which should not be there, e.g. "two" or ",!"£$£$%^&*()" or so on, and copy this text and paste into the block.

Is it prime does indeed return false for these, but given longer to play with one could find something which breaks a function more.
I initially found the error by pasting in a long number using a comma. (There is also the fact that in different cultures some people use ',' rather than '.' to separate integers and rational or irrational floors. (but rational as on a computer)


# Proposal for fixing it

You could see if you can strip characters when pasting. I know this is possible in other languages, but do not know GP well enough to test it. Essentially, when pasting, you save it as a temporary variable, and then you search and replace for any reg exp not allowed in such a box.

M

MSandro
Posts: 162
Joined: Jul 26th, '17, 21:12

Re: Pasting in input boxes

Post by MSandro » Aug 4th, '17, 07:06

Yes, and there is also a bug when you enter some text in a textbox, move the cursor to the left and press the Del-key, it should delete letter right to the cursor but it deletes the letter on the left.
Last edited by MSandro on Aug 8th, '17, 10:58, edited 1 time in total.

SimpleSi
Posts: 330
Joined: Jul 2nd, '17, 13:47

Re: Pasting in input boxes

Post by SimpleSi » Aug 4th, '17, 09:01

it should delethe letter right to the cursor but it deletes the letter on the left.
+1 using Win10

JohnM
Posts: 379
Joined: Sep 11th, '15, 14:42

Re: Pasting in input boxes

Post by JohnM » Sep 20th, '17, 19:59

the Del-key, it should delete letter right to the cursor
Fixed in v75.
If there is an input box which is number only, you can still paste other characters in.
Not yet fixed, but not forgotten!

Post Reply