fixed cursor position error when scroll