Script editor bug: pasting text adds blanks

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Script editor bug: pasting text adds blanks

Post by kintrupf » 16 Jan 2014 14:13

There seems to be a small bug in the script editor.
Every time I paste text into the editor an unwanted blank is added in front (and sometimes at back) of the inserted text.
This is most often not wanted and the blanks have to be removed manually.

Example:
Text on clipboard is "test" (without any blanks or quotes)
Text in script editor, cursor position marked by '|': removeVariable('|');
Text after paste, unwanted blanks marked as "_": removeVariable('_test_');

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: Script editor bug: pasting text adds blanks

Post by MURTUMA » 16 Jan 2014 17:27

Would you happen to use Android's built in feature or shortcut from keyboard. Some keyboards add that extra space there.

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: Script editor bug: pasting text adds blanks

Post by kintrupf » 17 Jan 2014 08:02

MURTUMA wrote:Would you happen to use Android's built in feature or shortcut from keyboard. Some keyboards add that extra space there.
I don't think it's the keyboard I use (Swype). The unwanted blanks are also added when I tab on the copy/paste icons that appear on top of the screen when text is selected in the script editor.
And changing to the stock keyboard did not change the behaviour.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Script editor bug: pasting text adds blanks

Post by Martin » 17 Jan 2014 11:12

The space is not added by Automagic but seems to be a 'feature' of text fields in general. The space is usually added before or after the pasted text when the text field already contains some other text.
Let me check if this can be disabled somehow, it's quite an annoying feature.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Script editor bug: pasting text adds blanks

Post by Martin » 17 Jan 2014 15:45

Just checked, the feature to add the spaces before or after the pasted text is really a feature of the base text fields of Android. Android inserts the space in front of of the pasted text from the clipboard when there is already some text in front of the insertion point (except when there's a space character).
Removing this feature involves some hacks that could potentially break some versions of Android so I'm not going to change it (sadly).

Post Reply