From 2ddbd58971bb07cc6cbde48e075b0f7aa10dcb03 Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Sun, 26 Aug 2012 00:07:47 -0700 Subject: Fix rectangle flashing on pages with a relative-positioned . --- lib/dom_utils.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index 57930f80..d4a4d379 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -128,8 +128,8 @@ DomUtils = flashEl.style.top = rect.top + window.scrollY + "px" flashEl.style.width = rect.width + "px" flashEl.style.height = rect.height + "px" - document.body.appendChild(flashEl) - setTimeout((-> flashEl.parentNode.removeChild(flashEl)), 400) + document.documentElement.appendChild(flashEl) + setTimeout((-> DomUtils.removeElement flashEl), 400) root = exports ? window root.DomUtils = DomUtils -- cgit v1.2.3