close a dialog on location change fixes #95

Optionally close a dialog when location is changed, e.g. a view is changed, but the dialog is attached to the main document body.

Testing of this was mainly done in a project with custom themes, I can supply a modified version of the example index.html if requried.