I have a simple dialog window, with the standard close button. Window's content is set dynamically. I can close the window either by clicking the close button on the upper right corner. either by clicking another button on the bottom. in both cases the same function is called, but results are different.
If I reopen the window second time, in the first case contents of input fields become unselectable by mouse.
Code is bellow.