Does all dialog work properlly after deleting this line ?
It was because in some places there's no listener in dialog's button, so it made dialog dissapear when no action had to be performed after click.