I would suggest to move this line to the end of 'updateNameConfirmButton.onclick' because no matter the renaming success or not, we always need to hide the dialog.