Because of ` $(dialog_id).ocdialog('destroy').remove();` still being in button callback at line 381.