Copy link to clipboard
Copied
Hello folks,
i want to show dialog box just before closing document , like if i click on close button of document then my extensions should call a method to stop closing the document and open a dialog box before proceeding for close event. is there any way to do so please help is possible ?
Note - I'm using cs_host_adapter-2 event AIEvent.DOCUMENT_ABOUT_TO_CLOSE = 'AI Document About To Close Notifier'; it works but document gets closed after opening the dialog.
Copy link to clipboard
Copied
HostAdapter plug-in can't prevent default and stop bubbling.
However, You cam make your custom adapter plug-in with Illustrator SDK.
Copy link to clipboard
Copied
What if they immediately re-open the document and the dialog will then control another {if ok then close else do something} action?
Copy link to clipboard
Copied
Probably, They need more confirmation to their users and wait to proceeding when close documents.
I wrote similar feature in InDesing a few years ago. User selects close menu, confirmation dialog comes up and waiting while user clicks proceed or cancel button.