DEV: remove scroll-top mixin file (#32398)

Follow up to https://github.com/discourse/discourse/pull/32367, and
removal of references to this mixin file from other supported repos.

This deletes the mixin file, the logic is duplicated in
https://github.com/discourse/discourse/blob/1e0d773b54e6ef2b6e94cfaa088293982111e2e3/app/assets/javascripts/discourse/app/lib/scroll-top.js.
This commit is contained in:
Kelv
2025-04-23 09:45:38 +08:00
committed by GitHub
parent b888ec07cb
commit e4c70e37cc
@@ -1,21 +0,0 @@
import { scheduleOnce } from "@ember/runloop";
import { isTesting } from "discourse/lib/environment";
import DiscourseURL from "discourse/lib/url";
const context = {
_scrollTop() {
if (isTesting()) {
return;
}
document.documentElement.scrollTop = 0;
},
};
function scrollTop() {
if (DiscourseURL.isJumpScheduled()) {
return;
}
scheduleOnce("afterRender", context, context._scrollTop);
}
export { scrollTop };