Fix a bug in the InputDialog when pressing Enter inside the textfield