Textinput: Justify a code format

Fixes gh-7303
Ref gh-7464
Textinput: Add comments to the code

Fixes gh-7303
Ref gh-7464