mirror of
https://github.com/discourse/discourse.git
synced 2026-08-02 09:29:37 -05:00
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:
@@ -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 };
|
||||
Reference in New Issue
Block a user