~sircmpwn/sr.ht-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[PATCH] fix job.html #bottom browser-compatibility

Details
Message ID
<20200104213606.2613-1-noah@noahloomans.com>
DKIM signature
missing
Download raw message
Patch: +1 -1
document.body is as far as I can tell the non-standard and legacy
scrolling-element which is currently only used in IE and Edge. Firefox,
Chromium, and Safari have migrated to document.documentElement and
don't support document.body anymore.

Note that I couldn't directly test this change as I don't have a working
builds.sr.ht setup, but I did my best to test the modified line
on BrowserStack using all the aforementioned browsers.
---
 buildsrht/templates/job.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/buildsrht/templates/job.html b/buildsrht/templates/job.html
index 4266fd3..0afb3e2 100644
--- a/buildsrht/templates/job.html
@@ -155,7 +155,7 @@
    }
    if (window.location.hash === "#bottom") {
      window.setTimeout(function() {
        document.body.scrollTop = document.body.scrollHeight;
        document.documentElement.scrollTop = document.documentElement.scrollHeight;
      }, 100);
    }
  });
-- 
2.24.1
Review patch Export thread (mbox)