check progress element exists when adjusting progress bar during codemirror load