Click outside of Dialog Field does not trigger close event

Im currently implementing <k-pages-dialog> for a custom field. The Problem I have, I want to reset some data, when the dialog is closed.

<k-pages-dialog 
      ref="pagesDialog" 
      @submit="select" 
     size="large"
    @close="clearDialog()" 
    @cancel="clearDialog()"
 />

...

methods: {
  clearDialog() {
     console.log('clear');
  }
}

...

The @cancel event does the trick, but the @close event is not firing, when I click outside of the dialog and it closes. Is it possible to avoid the closing of the dialog window, when I click outside of it?

This is also a general issue, sometimes it’s annoying, when the dialog window closes and alle entered form data gets los just because one was clicking outside of the dialog unintentionally.