Menu

#1268 InfoViewer doesn't handle hyperlinks correctly

open
nobody
None
5
2012-02-29
2010-01-06
Damien
No

When viewing a java API page in InfoViewer (such as jEdit's api docs), clicking on a link that jumps to a point on that page (e.g. clicking on a method or a field) often causes the page to go back up to the top, or some other undesired destination. Clicking in the address bar and hitting enter causes the page to go to the correct location, but clicking on links more often than not fails.

Discussion

  • Alan Ezust

    Alan Ezust - 2010-01-06

    I think the infoviewer does not handle the first or second hyperlink clicks correctly, but after the 2nd time, it usually does.

     
  • Damien

    Damien - 2010-01-06

    Any idea what causes it?

     
  • Alan Ezust

    Alan Ezust - 2010-01-07

    It might be a bug I introduced while adding the "back" and "forward" buttons.
    In fact. I haven't looked at the infoviewer code in a while,

     
  • Alan Ezust

    Alan Ezust - 2010-01-08

    Playing some more with it, what it seems to be is that the first time you click on a hyperlink that goes to a new file, it always fails the first time, and works the second time.

    It seems to me that infoviewer requests that files be loaded but doesn't wait long enough before making an attempt to change the position to what the URL refers to.
    So you have to make repeated attempts to click on any hyperlink that goes to a different file.
    Does that seem consistent with your observation?

     
  • Alan Ezust

    Alan Ezust - 2010-01-08
    • summary: InfoViewer doesn't handle API links correctly --> InfoViewer doesn't handle hyperlinks correctly
     
  • Damien

    Damien - 2010-01-09

    Not exactly, but it could be close. The problem I noticed isn't switching between pages, but jumping to a location further down on the same page. It may be a reloading issue, as it does appear to flicker the first time the link is clicked, but I can't confirm that readily.

     
  • Alan Ezust

    Alan Ezust - 2011-10-27

    It has nothing to do with whether the page is already loaded.
    I can reproduce this issue by toggling between two hyperlinks in the same HTML file for any link that has a #something in the URL.

    For me it requires 2 clicks always when I am selecting treenodes with a # in the URL. The first click brings me to the top of the file, the second brings me to the correct location in the file.

     
  • Anonymous

    Anonymous - 2012-01-16
    • assigned_to: nobody --> shlomy
     
  • Anonymous

    Anonymous - 2012-01-18

    Alan is right. The problem happens because the document is loaded asynchronously, and the GUI is not updated when the document is done loading. Forcing synchronous loading fixes the problem. However I don't know yet how to do this the right way, I am checking it.

     
  • Alan Ezust

    Alan Ezust - 2012-01-19

    Why the heck does this problem exist in InfoViewer but not jEdit's own built-in helpviewer??

     
  • Anonymous

    Anonymous - 2012-02-29
    • assigned_to: shlomy --> nobody
     

Log in to post a comment.