View Single Post
Old 08-21-2018, 06:34 PM   #1
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
[Bug] HTML Comments in Preview

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:
Code:
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<p>Paragraph 3</p>
<p>Paragraph 4</p>
<p>Paragraph 5</p>
<p>Paragraph 6</p>
<p>Paragraph 7</p>
<p>Paragraph 8</p>
<p>Paragraph 9</p>
<p>Paragraph 10</p>
<p>Paragraph 11</p>
<p>Paragraph 12</p>
<p>Paragraph 13</p>
<p>Paragraph 14</p>

<!--Comment 15-->

<p>Paragraph 15</p>

<p>Paragraph 16</p>
[...]

<p>Paragraph 100</p>


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:

Click image for larger version

Name:	BugLine24.png
Views:	220
Size:	8.9 KB
ID:	165779

If you press anywhere in Line 25/26, Preview jumps to the top:

Click image for larger version

Name:	BugLine25.png
Views:	210
Size:	8.1 KB
ID:	165780

Code:
<p>Paragraph 14</p>|Fine
|Fine
<!--Comment 15-->|JumpsToTop
|JumpsToTop
<p>Paragraph 15</p>|Fine
|Fine
<p>Paragraph 16</p>|Fine
[...]
<p>Paragraph 29</p>|Fine
<!-- Comment 30-->|JumpsToTop
<p>Paragraph 30</p>|Fine
What you expect is:

Code:
<p>Paragraph 14</p>|Fine
|Fine
<!--Comment 15-->|StaysSameAsP14
|StaysSameAsP14
<p>Paragraph 15</p>|Fine
|Fine
<p>Paragraph 16</p>|Fine
[...]
<p>Paragraph 29</p>|Fine
<!-- Comment 30-->|StaysSameAsP29
<p>Paragraph 30</p>|Fine
Attached Files
File Type: epub PreviewHTMLCommentsTest.epub (2.0 KB, 184 views)
Tex2002ans is offline   Reply With Quote