mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Merge pull request #34936 from overleaf/jel-scroll-to-notification
[web] Scroll to new notification added above domains table GitOrigin-RevId: f62851398de3a54ef07c0e125c65a29dd84af6f8
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
export function elementIsInView(el: HTMLElement): boolean {
|
||||
const rect = el.getBoundingClientRect()
|
||||
// Any vertical intersection with the viewport counts as "in view".
|
||||
return rect.bottom > 0 && rect.top < window.innerHeight
|
||||
}
|
||||
Reference in New Issue
Block a user