Tentative fix for scroll pos sometimes not being correctly set when leaving the code editor (and loading the page I think).
Closes #3530592