Improve scroll-lock behaviours during refreshing timeline and after that.

Improve code quality.