Placeholder text, behaviours, openField
Posted: Wed Mar 17, 2021 10:53 pm
Hi all,
I've adapted Trevor's excellent code to an interface group that contains a field that should have placeholder text.
The code is shown as a lesson: https://lessons.livecode.com/m/4071/l/6 ... -behaviors
This works well... except when opening the stack and the field is empty (ie it just displays the placeholder text).
The placeholder text is displayed as intended, but clicking or tabbing into the field doesn't make the placeholder text go away and inserts itself into whatever you type.
To make it work properly, i have to enter value, delete it, focus on nothing/something else and then enter text again - after that it continues to work as intended until stack is closed, but recurs on re-opening (if the uText is empty).
There's something about openField that doesn't fire on opening the stack?
Any suggestions?
I've adapted Trevor's excellent code to an interface group that contains a field that should have placeholder text.
The code is shown as a lesson: https://lessons.livecode.com/m/4071/l/6 ... -behaviors
This works well... except when opening the stack and the field is empty (ie it just displays the placeholder text).
The placeholder text is displayed as intended, but clicking or tabbing into the field doesn't make the placeholder text go away and inserts itself into whatever you type.
To make it work properly, i have to enter value, delete it, focus on nothing/something else and then enter text again - after that it continues to work as intended until stack is closed, but recurs on re-opening (if the uText is empty).
There's something about openField that doesn't fire on opening the stack?
Any suggestions?