How to hide a button when the user start to edit a "Text Input"?

Near the bottom of the screen I have a “Text Input” and a “Button”. This “Button” is located below the “Text Input”. When the user starts to editing the “Text Input”, the keyboard appears and the “Button” covers the “Text Input”.
How can I hide the “Button” when editing a “Text Input” and show when done?
Many Thanks!

With Classic, you could rely on the event “get focus” that applies to the text input, but for some reason, X does not capture this.

However, one thing that you can do is have a timer running and checking if there is any change in the text input from a previous value (say it checks once every half second, no need to make it faster). Entering the first character would then be recognized, and the hiding of the button could be done by the “do something” associated with the time firing (unfortunately, between the moment the text entry is selected until the first character is entered, there is not much that can be done, the button would still show).

When you finish entering, I presume you rely on a “done” button of some sort (since unlike Classic,you cannot rely on a “lost focus” event) which could restore the button to visible.

X would benefit from having a “is keyboard showing?” function, which is badly needed. It has a “dismiss keyboard” function, but that is all it has.

You can use the new block “when textInput changes”

When textInput changes
Do:-
Set button1 visibility to false