diff options
| -rw-r--r-- | lib/dom_utils.coffee | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index d0bd4615..24747837 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -293,7 +293,8 @@ DomUtils = style = getComputedStyle box if style.position == "static" and not /content|paint|strict/.test(style.contain or "") zoom = +style.zoom || 1 - top: Math.ceil(window.scrollY / zoom), left: Math.ceil(window.scrollX / zoom) + ratio = window.devicePixelRatio ? 1 + top: Math.ceil(window.scrollY * ratio / zoom), left: Math.ceil(window.scrollX * ratio / zoom) else rect = box.getBoundingClientRect() top: -rect.top - box.clientTop, left: -rect.left - box.clientLeft |
