Only fix the scroll position when the editor is mounted

fixes #2664