![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,641
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
![]()
Look at the epub I attach. When you do click in PV doesn't sync with CV (go to the last image in PV and do click there; you'll see that nothing happens in CV), but when you do click in CV, PV syncs. It seems that PV has issues to sync when there are images inside a table cells.
Regards |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,478
Karma: 5703586
Join Date: Nov 2009
Device: many
|
It just does not sync to images. It never has. It was designed that way because of the previous (heavy?) use of image maps where clicking on an image needed to act like a link and load something new and that was broken by treating it as a sync request..
Clicking just before or after an image in its caption or title is how syncing to CodeView was designed to work. Last edited by KevinH; 06-17-2021 at 11:17 AM. |
![]() |
![]() |
![]() |
#3 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,478
Karma: 5703586
Join Date: Nov 2009
Device: many
|
I did ty this by changing your test case to add caption to each table and it did sync to them correctly.
Last edited by KevinH; 06-17-2021 at 11:35 AM. |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,641
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Ok. Given that clicking in a <img> tag in CV syncs with PV, I thought that the opposite also should happen, that is, clicking in an image in PV, CV is syncronized. Now, for your words, I understand that what I experimented is a normal behaviour in Sigil.
|
![]() |
![]() |
![]() |
#5 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,478
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Yes, in CV we build up a path to an element using a real xhtml parser. Each element of the path is the node name and its child number (only counting elements not text children). With this path we sync PV.
In PV we get the current caret of any text selection using document.getSelection to get the text node and walk up the dom recording its path (parent element and index of child in node (only counting element children)). This path is then sent to CV which uses an xhtml parser of its current contents to find the location. So CV positions will get you to any element. But PV positions can only be recorded for its selected (clicked in) text. It has always been like that. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[BUG] - M96 out of memory - [BUG] | Alf77 | Onyx Boox | 5 | 02-05-2015 11:47 AM |
Possible Bug | KyBunnies | Calibre Companion | 3 | 07-26-2014 02:59 PM |
DR800 Help, I've got a bug!! A bug on my screen!! | Franky | iRex | 4 | 06-21-2011 11:45 AM |
Embedded font bug or CSS bug in ADE | JSWolf | ePub | 10 | 06-11-2011 02:34 PM |
PRS-505 bug or eBookLib bug? | porkupan | Sony Reader | 3 | 10-07-2007 10:44 PM |