shell: Clears text after leaving dialog box

Fixes #810
Closes #811

Reviewed-by: Stef Walter <stefw@redhat.com>