moved the check for html file type to when preview pane is being opened
removed code for calculating select box position