06-29-2019, 12:04 AM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jun 2019
Location: Chambly, QC, Canada
Device: iPad, iMac
|
0.9.15 Beta - Code view to Preview sync
I recently downloaded and tried Sigil 0.9.15 Beta because 0.9.14 was always becoming sluggish and memory hungry beyond belief requiring regular program restarts on Mac OS 10.12.6. The sluggishness and memory leaks seem to have gone or become unnoticeable in 0.9.15.
However, there seems to be a problem in synching between the Code view and the Preview. If I click within the Code view, the Preview scrolls to the equivalent place, as expected, and vice versa. If I then click on a link internal to the file in the Preview pane (a link to an endnote), the Preview scrolls to the appropriate location, but not the Code view. From that point on, wherever I click in the Preview causes no change to the Code view and clicking in the Code view has no effect on the Preview view. If I then save the ebook, the synching comes back until I click another internal link... Has anybody else noticed this problem? I need the synching to work properly to verify the numerous links and backlinks to endnotes in my document. |
06-29-2019, 08:46 AM | #2 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Yes, internal link's to id fragments within the same xhtml file was probably never fully tested for the beta. If I can recreate this, I will try to fix it for the full release.
Thanks for your bug report. |
Advert | |
|
06-29-2019, 09:05 AM | #3 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
As a temporary workaround, does changing CodeView via BookBrowser to another xhtml file and then back bring back CodeView Preview syncing or must you restart Sigil?
|
06-29-2019, 10:25 AM | #4 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
I can reproduce this on my dev machine. We will get this fixed before a final release. The workaround I suggested above seems to work.
|
06-29-2019, 06:36 PM | #5 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jun 2019
Location: Chambly, QC, Canada
Device: iPad, iMac
|
Thanks for the quick response!
Changing to another file works, so does saving the book, but it does not help to check the links, both methods bring the view back to wherever the pointer was in the CodeView. With the synching, there is no guess work, because the pointer goes directly to the target ID. While I wait for the release version, I'll just have to pay attention in creating my links. |
Advert | |
|
06-29-2019, 06:42 PM | #6 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
You can check all links mch quicker using Reports, if that helps.
|
06-29-2019, 07:23 PM | #7 | ||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Quote:
For example, you might have: Link 2 accidentally jump to Footnote 3 Link 3 accidentally jump to Footnote 2 Reports/epubcheck would see no problems, but you would be able to catch the error by clicking on links. Note: Of course, this could be mitigated by using meaningful IDs on your links too. Side Note: Speaking of links in the newer Sigil, did the Right-Click > Copy Link Location ever happen? That would be so helpful when working on books with URLs pointing to external websites. |
||
06-29-2019, 07:55 PM | #8 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
What Right-Cick > Copy Link Locaion? What would it do? Copy an external webpage to the clipboard? Right now, if you click an external link in your epub, Sigil will tell Desktop Services to open that link in whatever app is supposed to. Typically an external browser.
From there you can copy text, links, get the source code or just vetify the link takes the reader to the right place. |
06-29-2019, 09:14 PM | #9 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
I brought it up way back in this topic/post:
https://www.mobileread.com/forums/sh...87&postcount=1 Quote:
Currently: 1. Left-Click on a Link: Code:
<p><a href="http://example.com">example.com</a></p> Code:
Are you sure you want to open this external link? http://example.com OK/Cancel 3. Opens in default browser. 4. Within the browser, you can then Copy/Paste the URL or do whatever. Potential: 1. Right-Click on a Link: Code:
<p><a href="http://example.com">example.com</a></p> This allows you to get: http://example.com right in your clipboard. 3. Continue doing whatever you needed to do with the URL. * * * And here are just a few use-cases: 1. Pasting the URL into a Private Window instead. 2. My Default Browser = Firefox, but I might want to use Chrome for certain links. Doing it this way, I could Copy/Paste the URL into my secondary Chrome. Or in an instance of the browser on my secondary monitor. |
|
06-29-2019, 09:38 PM | #10 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
In CodeView simply highlight the link href and copy it as text to the clipboard if all you want is the url. Obviously I must be missing something?
|
06-30-2019, 12:09 AM | #11 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Without having to jump back into Code View, find the exact <a> location, copy/paste the correct href (making sure you don't highlight "" or pick a different <a> within a single <p>), [...]. |
|
06-30-2019, 02:44 PM | #12 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Finally had a chance to debug this sync breakage by clicking on local link.
For the record. It seems that QWebEnginePage acceptNavigationRequests() does NOT allow for interception of link to fragments in the local page. So the PreviewWindow is doing that internal navigation completely on its own and therefore does NOT tell CV about it. To make matters worse clicking on a local link causes a loadStarted signal and loadProgress signals but no loadFinished signal (a serious bug in QtWebEngine). Without a proper loadFinished signal no javascript will work anymore without a full page reload in the approach/model we use. That is why CV does not scroll properly, and why further syncing seems to require switching CV window tab and back. See QTBUG-76802 for my official bug report. I can work around the missing loadFinished signal (i.e. synthetically create it when progress reaches 100). I just have to figure a way to tell that an internal link to a local fragment has been done, so I know to tell CV to sync to the link. Putting this here to help document what needs to be done before a final release. |
07-01-2019, 07:34 PM | #13 |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
The fix for "lost sync due to a local link" has now been pushed to master. So if you build your own, you can pull from Sigil master to get the fix.
Otherwise the fix will appear in the upcoming full release. |
07-05-2019, 01:08 PM | #14 | |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
FWIW, I implemented copying the hover url to the clipboard when a user right clicks on a link in Preview. I added this because to fix the issue this thread was about, I had to know when a left button click occurred over a link. So the fix for that bug made adding this enhancement request quite painless. I am still not convinced as to its overall need, but the change needed was very minor given what we have in master right now.
This enhancement request will appear in the upcoming version of Sigil. Be aware that the url for internal links will be internal to the Sigil temp files so be very careful when using it not to modify the temp files under Sigil's nose if you use that clipboard link. Take care, KevinH Quote:
|
|
07-05-2019, 03:12 PM | #15 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Preview panel no long tracking Code View | Notjohn | Sigil | 4 | 10-03-2018 04:15 PM |
Differences in Code view and File preview | chaot | Editor | 3 | 05-18-2016 02:49 PM |
replace in book view changes view to code view | cybmole | Sigil | 4 | 10-28-2012 01:20 PM |
Sigil highlight Book View No Longer Shows in Code View | Themus | Sigil | 4 | 10-04-2012 07:54 PM |
lock book view & code view windows into synch | cybmole | Sigil | 5 | 01-19-2011 10:30 PM |