View Single Post
Old 02-14-2026, 11:25 AM   #191
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,402
Karma: 6686152
Join Date: Nov 2009
Device: many
@BeckyEbook
Thank you that really helped. Here is the critical snippet:

Code:
Debug: MW: UpdatePreview()
Debug: MW: UpdatePreview requested from CSS or SVG - saving tab content
Debug: MW: UpdatePreview to non-html resource, using Previous
Debug: ViewPreview GetCaretLocation:  ""
Debug: MW: UpdatePreview using current PreviewWindow location
Debug: Caching:  "OEBPS/Chapter-07.xhtml"
Debug: MW: Invoking UpdatePage with:  "OEBPS/Chapter-07.xhtml"
Debug: clearing Preview's httpcache
Debug: ViewPreview Cache Cleared
Debug: Javascript error:  QWebEnginePage::ErrorMessageLevel "Uncaught TypeError: Cannot read properties of null (reading 'scrollWidth') on line:7 Source:sigil:///C:/Users/Becky/AppData/Local/sigil-ebook/sigil/workspace/Sigil-RPNDuX/OEBPS/Chapter-07.xhtml"
Debug: MW: UpdatePreview()
Debug: MW: UpdatePreview to non-html resource, using Previous
Debug: MW: UpdatePreview()
Debug: MW: UpdatePreview to non-html resource, using Previous
Debug: ViewPreview GetCaretLocation:  ""
Debug: MW: UpdatePreview using current PreviewWindow location
There are two things of note. You are still getting that weird javascript error but at least it is not causing problems this time:

Debug: Javascript error: QWebEnginePage::ErrorMessageLevel "Uncaught TypeError: Cannot read properties of null (reading 'scrollWidth') on line:7 Source:sigil:///C:/Users/Becky/AppData/Local/sigil-ebook/sigil/workspace/Sigil-RPNDuX/OEBPS/Chapter-07.xhtml"

But even earlier that that a javascript call to get the current location of the cursor in Preview failed:

Debug: ViewPreview GetCaretLocation: ""

This javascript routine should never return an empty string. It should at least have the html and body tags in the path if the file is correctly loaded.

So either that file is not loading from the cache properly, or the timing of when we run the javascript to get the current location is broken somehow.


I was finally able to get my Windows 11 VM to fire up and was able to take the latest Windows build and run the same tests and in every case, eventually the GetCaretLocation javascript is failing.

This results in Preview losing its stored last location and from there on out it will default to the top of the file.

I will try to now track down what is happening that causes the javascript routine to fail.

All of that said, in no place am I seeing any javascript log error messages.

Last edited by KevinH; 02-14-2026 at 12:32 PM.
KevinH is offline   Reply With Quote