O valor obtido por getBoundingClientRect().top está incorreto

NoSuchKey

рекомендация

отblog.csdn.net/lala1091/article/details/115526418