Learn more about these different git repos.
Other Git URLs
I have Chromium. When I head to e.g. https://pagure.io/releng/blob/master/f/scripts/distgit/utilities.py and i click a line number, the line is highlited, the URL changes to https://pagure.io/releng/blob/master/f/scripts/distgit/utilities.py#_19 and the view in my browser scrolls to that line.
However when I visit https://pagure.io/releng/blob/master/f/scripts/distgit/utilities.py#_19 directly the line is not highlighted and the browser doesn't scroll.
Metadata Update from @pingou: - Issue tagged with: JS, bug
In firefox it seems the scroll happens but not the highlight :(
For me both highlight and scroll do not work even with Firefox: https://pagure.io/fedora-ci/messages/blob/master/f/examples/brew-build.test.complete.json#_12
It doesn't work for me either.
Metadata Update from @jlanda: - Issue assigned to jlanda
Metadata Update from @jlanda: - Issue set to the milestone: 5.7
this should be working on staging:
https://stg.pagure.io/bodhi/blob/develop/f/bodhi/models/models.py#_1519 or https://stg.pagure.io/bodhi/blob/develop/f/bodhi/models/models.py#_1519-1660
In Chromium on first try, the line is highlighted, but page is scrolled to a wrong place - it scrolls to the line before all the fancy css and fonts load and later is not rescrolled when that happens.
On second (presumably cached) load, it scrolls to that line immediately and than jumps a little above. The jump seems a bit disruptive, yes still better than current situation. Would you like a video?
I used scrollIntoView() but it seems that it support is not the best one. I'll have to go on old way of doing this and scroll calculating distances :(
scrollIntoView()
now better @churchyard ?
Thank You! Scroll and highlight both work in Chromium.
As a side note: Is the "smooth" scroll to the line intentional for effect or necessary to make it work? If intentional, consider not to do it, it's IMHO quite disturbing to watch. (But not a big deal if it is necessary, consider this issue fixed.)
I don't think is really needed, I'll try eith smooth:false
The real trick is on the timeout delay, otherwise the navigator does not have enough time to convert the code on a html table and fails computing the real scrolling distance
Metadata Update from @pingou: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.