fix(dialog): Close dialog on location change.