From d4d2cd508cbd89624a5b02250a78d3dcfa8af19b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 20 Aug 2012 13:07:03 +0530 Subject: [PATCH] ... --- resources/compiled_coffeescript.zip | Bin 56865 -> 57018 bytes src/calibre/ebooks/oeb/display/paged.coffee | 8 +++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/compiled_coffeescript.zip b/resources/compiled_coffeescript.zip index 1b22ec5b04170cc54e829f7a11e5cff2635db40a..3517cf1363c2d6b808de9b2fa7ecd4e1213d7fdd 100644 GIT binary patch delta 317 zcmZ3uhk4gtW|;tQW)=|!5V)No;#gNwU?tpvl$eR43azaETd3$7jY`b1A?9L{prD z2DfpvL9C8KQD%BZ$>f=bq&Kf|kYZy7TD-ZWkT-F2dGIgU&5f7Na!$?<=Gc79Z6(iS zzdKxfs1BQ)cE?%)B&2>uHu7cy0|N+4f;<2Rq3)9x-c_Ic=8haw>I$$Y<^^+1*1W65 zB(e?6^-biSya&jQKL+Ohy(_@N$Rxr%`GA`g58M<6lM6suMG;mukPsUX?q_6RczOrK F0|1f}WuX87 delta 240 zcmdnBmwDkHX6XQLW)=|!5Rga~aV*}i?9lASzyQM1lLhX|ZM1x9H~D-E$7By3`meCQoFQpZv=~mD@1dAXZ1AC^J2yWb*mB z(wki!rPwyxU0BJpIei6_9CLS#(B>p}-o(wB$Ify}FfxfSW3ztp|2x)`Q}4+!?Qxr2 z=q@^W);*rd<##oha)T!?yz9;+lL!|5e^(r2-elXm(oE@vKq2YLT=%q?$}fRsCmiFO NyyTt$o6jAP_W&RxQosNJ diff --git a/src/calibre/ebooks/oeb/display/paged.coffee b/src/calibre/ebooks/oeb/display/paged.coffee index a26f5931c9..4f912513a9 100644 --- a/src/calibre/ebooks/oeb/display/paged.coffee +++ b/src/calibre/ebooks/oeb/display/paged.coffee @@ -378,7 +378,9 @@ class PagedDisplay # The Conformal Fragment Identifier at the current position, returns # null if it could not be calculated. Requires the cfi.coffee library. ans = null - if not window.cfi? + if not window.cfi? or (window.mathjax?.math_present and not window.mathjax?.math_loaded) + # If MathJax is loading, it is changing the DOM, so we cannot + # reliably generate a CFI return ans if this.in_paged_mode c = this.current_column_location() @@ -412,9 +414,9 @@ class PagedDisplay return ans click_for_page_turn: (event) -> - # Check if the click event event should generate a apge turn. Returns + # Check if the click event should generate a page turn. Returns # null if it should not, true if it is a backwards page turn, false if - # it is a forward apge turn. + # it is a forward page turn. left_boundary = this.current_margin_side right_bondary = this.screen_width - this.current_margin_side if left_boundary > event.clientX