From 532662672f3504e661b3c33636bc33e86423d7f8 Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 4 May 2015 14:43:43 +0300 Subject: [PATCH] Editor: repaint code boxes on window scroll --- edit.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/edit.js b/edit.js index af4efe9b..58c24d41 100644 --- a/edit.js +++ b/edit.js @@ -372,6 +372,13 @@ document.addEventListener("keydown", function(event) { } }); +// remind Chrome to repaint a previously invisible editor box by toggling any element's transform +// this bug is present in some versions of Chrome (v37-40 or something) +document.addEventListener("scroll", function(event) { + var style = document.getElementById("name").style; + style.webkitTransform = style.webkitTransform ? "" : "scale(1)"; +}); + // Shift-Ctrl-Wheel scrolls entire page even when mouse is over a code editor document.addEventListener("wheel", function(event) { if (event.shiftKey && event.ctrlKey && !event.altKey && !event.metaKey) {