Fix preview and openFolderEvent for dialog