in raw 311 id check if the dialog is already open, and if it is clear the textbox other then that it this isnt bad for your first dialog