diff --git a/resources/compiled_coffeescript.zip b/resources/compiled_coffeescript.zip index dc290df6e3..ceef59650d 100644 Binary files a/resources/compiled_coffeescript.zip and b/resources/compiled_coffeescript.zip differ 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