From f12fc4c23e748e742d7676804abea424bdd9e0ad Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 Jan 2012 20:48:13 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/oeb/display/cfi.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/display/cfi.coffee b/src/calibre/ebooks/oeb/display/cfi.coffee index 7afaf5523d..a03dd49c0a 100644 --- a/src/calibre/ebooks/oeb/display/cfi.coffee +++ b/src/calibre/ebooks/oeb/display/cfi.coffee @@ -76,7 +76,9 @@ viewport_to_document = (x, y, doc) -> # {{{ # We are in a frame node = win.frameElement rect = node.getBoundingClientRect() - return viewport_to_document(rect.left, rect.top, node.ownerDocument) + [vx, vy] = viewport_to_document(rect.left, rect.top, node.ownerDocument) + x += vx + y += vy return [x, y] # }}}