Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaladoc in-page links don't work #6466

Open
scabug opened this issue Oct 2, 2012 · 8 comments
Open

Scaladoc in-page links don't work #6466

scabug opened this issue Oct 2, 2012 · 8 comments
Milestone

Comments

@scabug
Copy link

scabug commented Oct 2, 2012

[scaladoc interface bug, we should have a look at this during the Monday docspree]

to reproduce:

$ cat a.scala 
/** See [[foo]].
 *  @group hello
 */
class C {
  def foo = 1
}
$ scaladoc-2.10.0-wip -groups a.scala
model contains 2 documentable templates

Now open index.html in the browser. You'll get the root package with class C as a member. Click the link to foo in C's description. You'll get to class C and foo will be highlighted. So far so good.

Now, you're in class C's page, click again on the link to foo from the class description in the upper side of the main panel -- it should scroll to foo and highlight it. It doesn't do either of these. (you may need to resize the window to something smaller to check it's not scrolling)

Another example can be seen on:
http://chara.epfl.ch/~ureche/scaladoc/library/scala/language$.html#higherKinds:languageFeature.higherKinds

  1. The highlighting persists even though it should fade out
  2. Clicking on any of the links in object language's description doesn't do anything
@scabug
Copy link
Author

scabug commented Oct 2, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6466?orig=1
Reporter: @VladUreche
Affected Versions: 2.10.0

@scabug
Copy link
Author

scabug commented Nov 6, 2012

@ingoem said:
Taking this, since I have a fix.

@scabug
Copy link
Author

scabug commented May 15, 2013

@kzys said:
It does scroll (in Chrome, at least) but it would be better to have highlight.

@scabug
Copy link
Author

scabug commented May 15, 2013

@adriaanm said:
what's the status of this?

@scabug
Copy link
Author

scabug commented May 15, 2013

@ingoem said:
IIRC, the problem was that the generated html can contain multiple elements with the same id (one in each div for orderings grouped, alphabetic and by inheritance). This has undefined behavior. Most browsers seem to remember just the first or last encountered element with a given id, which might in a hidden div. In that case the browser scrolls to the hidden div, but it won't highlight it, because it is not visible. I guess that's what Kato observes.

Fixing all this was more complicated than I thought. Instead of simply copying the docs for each ordering group, one has to either move things around dynamically or change the ids. Feel free to reassign to someone from the doc team (if such thing still exists).

@scabug
Copy link
Author

scabug commented May 20, 2013

@JamesIry said:
2.10.2 is about to be cut. Kicking down the road and un-assigning to foster work stealing.

1 similar comment
@scabug
Copy link
Author

scabug commented May 20, 2013

@JamesIry said:
2.10.2 is about to be cut. Kicking down the road and un-assigning to foster work stealing.

@SethTisue
Copy link
Member

is this bug still present in Scala 2.13.0-M5?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants