fix(headerBar): More accurate scroll-to-top detection