history replace state implemented for dialogs

history replace state implemented for dialogs