AnsweredAssumed Answered

Canvas keeps scrolling to the top every 10 seconds, and it's driving me insane

Question asked by Nehal Patel on Nov 14, 2019
Latest reply on Nov 17, 2019 by Bobby Pedersen

Please watch the video first.



If you're using Safari and on a page with a rubric, Canvas will reliably scroll to the top every 10 seconds. I haven't been able to reproduce this on Chrome.


The culprit seems to be this function in the rubric implementation. Line 14 (not the actual line in the source code) in particular. This function is executed every 10 seconds, which causes the page to scroll to the top every 10 seconds.


originalSizeRatings() {
    const e = b()(".rubric:not(.rubric_summary) .criterion:visible")
    if (e.length) {
        const i = b.a.windowScrollTop()
        e.each((function() {
            const e = b()(this),
                i = e.find(".ratings:visible")
            if (i.length) {
                const r = i.find(".rating .container").css("height", ""),
                    t = Math.max(i.height(), e.find(".criterion_description .container .description_content").height())
                r.css("height", t - 10 + "px")


It's been happening for a month or two now. I don't think I've seen it happen on non-rubric pages. Please let me know if you need any more information!