render add link dialog when rendering thread rather than when showing dialog box, otherwise leave will not be called on it when the view is swapped (when user navigates to another page).