Dialog close on outside click

Hi there!
I’m implementing a dialog component, but would prefer not to have the default functionality of closing the dialog when the user clicks outside of it.
Is there a way to disable this functionality while maintaining the ability to close with esc and a close button?

setCloseOnOutsideClick(boolean)

Thanks so much!!