From 475a41d1582a52166be437f46332ab2db612c4f1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 19 Jun 2012 13:59:31 +0530 Subject: [PATCH] ... --- resources/compiled_coffeescript.zip | Bin 36843 -> 36843 bytes src/calibre/ebooks/oeb/display/paged.coffee | 2 ++ 2 files changed, 2 insertions(+) diff --git a/resources/compiled_coffeescript.zip b/resources/compiled_coffeescript.zip index dc290df6e3bbf87534acc106d57772b73a22df44..ceef59650df3e1057772eefde3baa9bfd62e6ff8 100644 GIT binary patch delta 28 hcmaDopXv2{Chh=lW)=|!5Xj!h{i}~Ldoo-9QviM&2?78B delta 28 hcmaDopXv2{Chh=lW)=|!5b)f{{i~1Bb23~1QviGW2)+OS diff --git a/src/calibre/ebooks/oeb/display/paged.coffee b/src/calibre/ebooks/oeb/display/paged.coffee index f4dcf4309e..8fa1caf8ea 100644 --- a/src/calibre/ebooks/oeb/display/paged.coffee +++ b/src/calibre/ebooks/oeb/display/paged.coffee @@ -225,6 +225,8 @@ class PagedDisplay this.scroll_to_xpos(absleft(elem) + 5) snap_to_selection: () -> + # Ensure that the viewport is positioned at the start of the column + # containing the start of the current selection sel = window.getSelection() r = sel.getRangeAt(0).getBoundingClientRect() node = sel.anchorNode