Shrinking text field when typing


#1

I am trying to insert a Cancel button and shrink the text field when the user input a text, but I did not find the proper handler for that. Does anyone have an idea about the issue?

I want to add the Cancel Button here when the user input something, just like the Safari one:


#2

I realize this is an old post, but there are now focusLost and textChanged events you can subscribe to. More info in this issue: https://github.com/NativeScript/NativeScript/issues/3889


#3

create stackLayout with Horizontal orientation set id of it.
and
ontextChanged of textbox you can add button to that layout dynamically and handle that button’s tap event.