In my example, history.back() was overwriting results that I made with dialog, so I needed option to set close url for dialog widget.
Here is my proposal for this.
Now there is option to set closeUrl for dialog widget
Thanks so much for the PR but we're just about to land a new feature to allow people to specify the position of the close button in dialogs or specify "none". If you specify none, you can then write you own custom button that could specify a different close URL by setting the href in the markup. We think this is the more flexible way to go.