Use passive listeners to improve scrolling performance #1605

This commit is contained in:
nymkappa 2022-05-17 11:39:13 +02:00
parent da3f516388
commit 4463dae46b
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04

View File

@ -39,7 +39,7 @@ export class ApiDocsComponent implements OnInit {
}
window.addEventListener('scroll', function() {
that.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative";
});
}, { passive: true} );
}, 1 );
}