Do you want to save changes you made to document before closing?
If you don't save, your changes will be lost.
Note: Press Tab key on the keyboard to enter inside the modal window after that press the Esc key. By default keyboard option is true that means modal hide on the press of escape key.