Could you add a type="button" on your Add/Edit buttons.
e.g. <button type="button" title="Add" ...>Add</button>
I'd like to debug the URL page you provided in Firebug, but I don't get
a chance to see the Dialog (even the first time), since clicking on
Add/Edit is submitting the form to the server. By default button
elements are of type="submit".
The code looks fine in general, but you have some HTML/Markup content
updates going on via background requests which I'd like to track (not
sure if these are relevant, but currently can't tell what they're doing)
Are you by any chance replacing the Add/Edit button markup every time
you submit a Dialog? If you are you'll need to re-attach the event