![]() |
[Bug] HTML Comments in Preview
3 Attachment(s)
Versions
Sigil 0.9.10 Windows 10 - 64 bit (Haven't tested on other OSes or older versions of Sigil) The Bug Attached is a sample EPUB. Let's say you have an HTML file in Code View with an HTML comment in it: Spoiler:
Preview window syncs to each location fine... until you place your cursor on the line With/After the HTML comment on it. Preview jumps all the way to the top of the file, instead of staying in the vicinity of the nearest <p>. If you press Line 24, Preview is fine: Attachment 165779 If you press anywhere in Line 25/26, Preview jumps to the top: Attachment 165780 Code:
<p>Paragraph 14</p>|FineCode:
<p>Paragraph 14</p>|Fine |
Yes comments are not actually considered tags inside a node tree in Preview and instead are special text nodes, so extracting a webpath to s comment will result in its parent block tag being used.
Try clicking on an actual tag not a text node. |
I was working on a book yesterday with lots of HTML Comments.
Usually I'm staring at Preview + clicking around in Code View out of the corner of my eye (mousewheel,click mousewheel,click)... and it was just awful having Preview constantly jumping up top. It also occurred while I was using Find/Replace or spellchecking with Preview open. Imagine: Code:
[...]Note: I just tested my example EPUB in Calibre's Editor, and Calibre acts as expected (no jumping). Quote:
|
Are you talking about clicking in Preview and having CodeView sync closely to a comment that is near that point you clicked (which is what I thought when I first read your post and replied about) or are you clicking in or on a comment in html and watching what Preview does. If it is the latter, then Preview is syncing to the parent tag of the text field/comment which in your example is the body tag. If just use arrow keys or click down one line in CodeView, Preview should happily resync automatically after a short delay. There might be a way to move to the previous sibling tag, but that is not how the code is actually designed nor how Sigil generates html paths currently.
|
Quote:
Quote:
|
| All times are GMT -4. The time now is 10:31 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.