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

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;
}
},