[0.17.68] Textfields ignore constraints on copy-paste

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 213
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

[0.17.68] Textfields ignore constraints on copy-paste

Post by Therenas »

Recently, textfields got the ability to constrain what users could enter into them, namely numeric, allow_decimal and allow_negative. This works great when the user is inputting text by typing it directly on their keyboard. Any characters that aren't allowed are simply dropped. However, this is not the case when copy-pasting into those fields, in which case the textfield accepts any string, regardless of the constraints that are set.

This is annoying for modders, because now we have to verify the input anyways, even if we set the constraints appropriately, which defeats part of the purpose of them. So I propose that copy-pasting invalid characters into textfields with constraints should either not paste an invalid string at all, or strip all invalid characters from them (Probably the latter).
Last edited by Therenas on Wed Sep 04, 2019 8:59 pm, edited 1 time in total.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5030
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Textfields ignore constraints on copy-paste

Post by Klonan »

This seems more like a bug than an interface request to me

moving to bug reports

User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 213
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: Textfields ignore constraints on copy-paste

Post by Therenas »

Thanks Klonan, wasn't sure where to put it.

posila
Factorio Staff
Factorio Staff
Posts: 5147
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.17.68] Textfields ignore constraints on copy-paste

Post by posila »

It's fixed for the next release.

Post Reply

Return to “Resolved Problems and Bugs”