DEV: replaces jquery scrollTop by vanilla js code (#9543)

This commit is contained in:
Joffrey JAFFEUX 2020-04-24 12:45:47 +02:00 committed by GitHub
parent 0616826841
commit d83f39be73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 10 deletions

View File

@ -658,17 +658,10 @@ export default Component.extend(
);
if (rowContainer) {
const $collection = $(
this.element.querySelector(".select-kit-collection")
);
const collectionContainer = rowContainer.parentNode;
const collectionTop = $collection.position().top;
$collection.scrollTop(
$collection.scrollTop() +
$(rowContainer).position().top -
collectionTop
);
collectionContainer.scrollTop =
rowContainer.offsetTop - collectionContainer.offsetTop;
}
},