Add autoOpen api for dialog;