Disable auto-scroll on firefox browser
This commit is contained in:
parent
3bf30bd63f
commit
ba5538afa1
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ main.querySelector("#email").addEventListener("keyup", e => {
|
|||
});
|
||||
|
||||
let observer = new IntersectionObserver(function(entries) {
|
||||
if(entries[0].isIntersecting === true)
|
||||
if(entries[0].isIntersecting === true && navigator.userAgent.toLowerCase().indexOf('firefox') <= -1)
|
||||
window.scrollTo({top: entries[0].target.getBoundingClientRect().top + window.scrollY,
|
||||
left: 0,
|
||||
behavior: 'smooth'});
|
||||
|
|
Reference in a new issue