shell: clears text after leaving dialog box

Fixes: #810