Removed unnecessary recreation of dialog html in legacy mode