preview box and switching to preview tab