Closing ebook-viewer footnotes causes page to jump back

Bug #1416526 reported by ct5 on 2015-01-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Calibre 2.17 on Ubuntu 14.04.


When reading an epub with the ebook-reader, if you click on a footnote it comes up in the footnote viewer. So far so good. Then when you close the footnote viewer, it returns you to the page before the one the footnote on, not the page the footnote was on.


Go to a page in an epub using the ebook reader. Click a footnote. Close the footnote window. The page will not return to the right point, but will return to the previous page.

Video of reproduction attached.

ct5 (ct5) wrote :

There are no pages in ebooks. When you close or open the footnote panel,
the size of the text window changes, this means all the text has to be
reflowed into new virtual pages, so it is not possible to preserve the
original page. One could argue that the sequence of open footnote
window, then close footnote window should be idempotent, but trying to
implement that is fraught with problems, because one then has to
robustly handle the case of changes in current page or unrelated window
resizes/font size changes/resize of other docked panels, etc. between
opening and closing the footnote popup -- all of which can invalidate
the saved before footnote page position.

You should leave the popup window open, or if you dont like that, make
it a floating window, instead of a docked one.

 status wontfix

Changed in calibre:
status: New → Won't Fix
Kovid Goyal (kovid) wrote :

I had a look at the code, and it looks like, it may be possible to at
least have the case:

open footnote
do nothing in the main text window (no page turns, no window resize, no font size change, etc.)
close footnote

preserve page position relatively easily.

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: Won't Fix → Fix Released
ct5 (ct5) wrote :

Ah yes I see your point concerning other movements between footnote window open and footnote window close.

Thanks for the fix!

ct5 (ct5) wrote :

Looks like this bug has been introduced in recent versions (Calibre 2.39 ubuntu 15.04). If someone tells me where the code is I could have a look myself.

Changed in calibre:
status: Fix Released → New
Kovid Goyal (kovid) wrote :

Not sure what you mean. The behavior I describe above -- open and close footnote with no intervening actions -- preserves page position exactly in calibre 2.40. Not to mention that there have not been any changes to viewer code in a long time.

If you want to look at the code, look at viewer/ (footnote_visibility_changed)

Closing as this works for me. But feel free to re-open if I have misunderstood what you meant.

Changed in calibre:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers