no what i have done is:
it will only work if the dialogs open, if the click refresh it will close the dialog, then reopen it, and then go to the tab that you were last on, because in another part i have it so when you click a tab, it's set's %tab as that tab's ID
Edit:
Please rate the snippet :)
Also look at http://www.hawkee.com/snippet/7236/ for a newer dialog just made :)