From b73eba3fed4a816106ef914eb80dc4da61d2efb8 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 16 Feb 2022 10:23:25 -0500 Subject: Fix some slight scrolling issues in error highlight --- docs/repl.js | 3 ++- docs/style.css | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/repl.js b/docs/repl.js index ceea08c2..5e891e5c 100644 --- a/docs/repl.js +++ b/docs/repl.js @@ -98,8 +98,8 @@ let highlightErr = (s, e) => { h.scrollTop = doc.code.scrollTop; h.scrollLeft = doc.code.scrollLeft; } - scroll(); clear(); + clear(); let w=e.message, is; while (w && (w.loc||(e.kind!=='!'&&w.sh&&w.sh[0]===2)) && w.src.join('')===s.join('')) { [is,w]=w; } @@ -116,6 +116,7 @@ let highlightErr = (s, e) => { } h.append(sl()); } + scroll(); } let keymode=0; // 1 for prefix diff --git a/docs/style.css b/docs/style.css index 8928fc26..3b2421ef 100644 --- a/docs/style.css +++ b/docs/style.css @@ -156,7 +156,7 @@ a.key { text-decoration:none; } cursor: pointer; } .highlight { - width: 100%; position: absolute; overflow: auto; + width: 100%; position: absolute; overflow: hidden; margin: 0; border: 1px solid transparent; color: transparent; pointer-events: none; white-space: pre-wrap; word-wrap: break-word; -- cgit v1.2.3