this is needed since scrollTop of scrollbar element can be reset to 0 when ace is moved in the document.