Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#3 scroll to selected anchor


When an entry is clicked in the contents or index
browser, xchm opens the page containing the entry, but
it doesn't scroll to the entry. This is not optimal,
especially when the entry is an anchor somewhere in a
very long page. This patch fixes this. It's been tested
browsing the NSIS (nsis.sourceforge.net) documentation
(you will not want to use it without this patch any
longer ;- ...)

Markus Schwarzenberg


    • assigned_to: nobody --> thewhiterabbit
    • status: open --> closed-accepted
  • Logged In: YES

    Ok, added it to CVS. It's going to be in v1.3. Thanks for the patch.

  • Logged In: YES

    Thanks. But now I'm getting the impression the described
    behavior is actually a wxwindows bug, because:
    * xchm always passed (without this patch) the complete
    location to wxHtmlWindow::LoadPage(), so why wxHtmlWindow
    doesn't scroll to the anchor when it loads the page?

    * There are situations where this patch first calls
    wxHtmlWindow::LoadPage(<LOC_WITHOUT_ANCHOR>), after that it
    calls ScrollToAnchor(<ANCHOR>), but after that wx still
    doesn't scroll to the anchor.

    Can you reproduce this behavior on a platform != solaris?
    Test case:
    * open NSIS.chm.
    * click Chapter2/Compiler --> "2.4 Compiler" opens.
    * click highligted word "here" --> "4.8. Installer
    Atributes" opens. Actually, the window should be scrolled
    down to " SetCompressor"
    This happens even with this patch, which does an explicit
    Attached a new patch wich contains some debugging printfs.

  • Logged In: YES

    You're right, the patch is useless :-D. Just removed it.
    You'd better let the wxWidgets people know about it (though
    I doubt they'll fix it anytime soon).