mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: replaces jquery scrollTop by vanilla js code (#9543)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user