unclickable text after dialog closed

unclickable text after dialog closed

I have a very weird problem. I have a dialog control with multiple textboxs, dropdowns, etc. If before close I leave my cursor in a textbox, then on the main page or any other dialog control opened thereafter including this one all textboxes become unclickable, meaning I can't put cursor in them to start typing. I can't select any text on the page either. At the same time if after clicking in a textbox in that "problematic" dialog I will select some text outside that textbox and then close the dialog, everything works fine. I tried triggering blur event on all textboxes in that dialog before close, I also tried triggering focus and click and double click on body of the page that's in dialog, nothing helped. I can't reproduce this behavior in any other dialog control.
Any ideas on what might cause this behaviour or how to work around it?
 
Thank you.