F5 / refresh scrolls to bottom #309

Closed
opened 2025-11-02 03:17:58 -06:00 by GiteaMirror · 25 comments
Owner

Originally created by @gsantner on GitHub (Feb 1, 2017).

  • Gitea version (or commit ref): 081485ecfd
  • Operating system: Debian 8 (Server, Desktop)
  • Browser: Firefox 51

Description

If I press F5 or click the browser's refresh button, the page gets reloaded, and automatically jumps to the bottom. This only happens on the dashboard for me.
(Url has no # anywhere, it's just the root (/gitea/)

EDIT: Also happens after login. And at the SSH-Keys page.

Below: Bounty plugin stuff I cannot remove which adds non github-conform markdown stuff not getting rendered- please fix


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Originally created by @gsantner on GitHub (Feb 1, 2017). - Gitea version (or commit ref): 081485ecfddc88a05fdea0b0230672271658c086 - Operating system: Debian 8 (Server, Desktop) - Browser: Firefox 51 ## Description If I press F5 or click the browser's refresh button, the page gets reloaded, and automatically jumps to the bottom. This only happens on the dashboard for me. (Url has no `#` anywhere, it's just the root (`/gitea/`) EDIT: Also happens after login. And at the SSH-Keys page. #### Below: Bounty plugin stuff I cannot remove which adds non github-conform markdown stuff not getting rendered- please fix <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/41571027-f5-refresh-scrolls-to-bottom?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github). </bountysource-plugin>
GiteaMirror added the reviewed/wontfix label 2025-11-02 03:17:58 -06:00
Author
Owner

@gsantner commented on GitHub (Feb 2, 2017):

@lunny Could you configure the bounsource integration somehow so it at least creates some empty lines, so it is distinguishable? It's just a block of unformatted text not getting rendered by github markdown

@gsantner commented on GitHub (Feb 2, 2017): @lunny Could you configure the bounsource integration somehow so it at least creates some empty lines, so it is distinguishable? It's just a block of unformatted text not getting rendered by github markdown
Author
Owner

@lunny commented on GitHub (Feb 3, 2017):

Don't know how to do that. Maybe @tboerger could know.

@lunny commented on GitHub (Feb 3, 2017): Don't know how to do that. Maybe @tboerger could know.
Author
Owner

@unixfox commented on GitHub (Feb 4, 2017):

I can confirm that I've this bug too on Gitea commit version 8bc43195.
It's a bit annoying to scroll the whole page to the top each time I visit the home page.

Tested on:

  • Firefox developer edition 52.0a2 (2017-01-05)
  • Firefox 51.0.1

I don't face to this bug using Google Chrome / Chromium.

@unixfox commented on GitHub (Feb 4, 2017): I can confirm that I've this bug too on Gitea commit version `8bc43195`. It's a bit annoying to scroll the whole page to the top each time I visit the home page. Tested on: - Firefox developer edition 52.0a2 (2017-01-05) - Firefox 51.0.1 I don't face to this bug using Google Chrome / Chromium.
Author
Owner

@tboerger commented on GitHub (Feb 9, 2017):

It's not possible to fix the bountysource plugin, there is an open pull request on the bountysource project, but it's not merged yet.

@tboerger commented on GitHub (Feb 9, 2017): It's not possible to fix the bountysource plugin, there is an open pull request on the bountysource project, but it's not merged yet.
Author
Owner

@bkcsoft commented on GitHub (Feb 12, 2017):

I can also confirm it on Fx 51.0.1

@bkcsoft commented on GitHub (Feb 12, 2017): I can also confirm it on Fx 51.0.1
Author
Owner

@hiliev commented on GitHub (Mar 13, 2017):

Happens for me with Firefox 51.0.1 and 52.0 on try.gitea.io. Doesn't affect Chrome. Also, pressing the Home key doesn't scroll to the top of the page, but only until the search field becomes visible.

@hiliev commented on GitHub (Mar 13, 2017): Happens for me with Firefox 51.0.1 and 52.0 on `try.gitea.io`. Doesn't affect Chrome. Also, pressing the Home key doesn't scroll to the top of the page, but only until the search field becomes visible.
Author
Owner

@kuklinistvan commented on GitHub (Aug 18, 2017):

Have the bottom scrolling problem here too with Firefox version 54.0. Chromium is not affected.

@kuklinistvan commented on GitHub (Aug 18, 2017): Have the bottom scrolling problem here too with Firefox version 54.0. Chromium is not affected.
Author
Owner

@gsantner commented on GitHub (Aug 18, 2017):

At Firefox 55 the scroll always jumps to the input fields at refresh/load

@gsantner commented on GitHub (Aug 18, 2017): At Firefox 55 the scroll always jumps to the input fields at refresh/load
Author
Owner

@kuklinistvan commented on GitHub (Aug 18, 2017):

Just upgraded to 55.0.2 and the problem still persists :(
*edit: not really the same way, actually. Hitting F5 brings the page to the bottom after refreshing, and the same happens if I load my site the first time from the browser. However, if I return to this page using a hyperlink or by manually specifying the url in the address bar (this time at least the second time, important), then it remains at the top.
**edit: still using the latest firefox and strangely, today the symptoms are exactly the same as in version 54.0

@kuklinistvan commented on GitHub (Aug 18, 2017): Just upgraded to 55.0.2 and the problem still persists :( *edit: not really the same way, actually. Hitting F5 brings the page to the bottom after refreshing, and the same happens if I load my site the first time from the browser. However, if I return to this page using a hyperlink or by manually specifying the url in the address bar (this time at least the second time, important), then it remains at the top. **edit: still using the latest firefox and strangely, today the symptoms are exactly the same as in version 54.0
Author
Owner

@gsantner commented on GitHub (Aug 19, 2017):

@kuklinistvan Scroll jumps to the first input-field in the page, in this case it is on the top

@gsantner commented on GitHub (Aug 19, 2017): @kuklinistvan Scroll jumps to the first input-field in the page, in this case it is on the top
Author
Owner

@gsantner commented on GitHub (Aug 19, 2017):

@lunny Isn't this a bug? As it is labeled as enhanchement

@gsantner commented on GitHub (Aug 19, 2017): @lunny Isn't this a bug? As it is labeled as `enhanchement`
Author
Owner

@daviian commented on GitHub (Aug 19, 2017):

I think this is fixed by https://github.com/go-gitea/gitea/pull/2285 as it doesn't happen to me on firefox on current master.
Difference may be that it now doesn't get autofocus via attribute.

@daviian commented on GitHub (Aug 19, 2017): I think this is fixed by https://github.com/go-gitea/gitea/pull/2285 as it doesn't happen to me on firefox on current master. Difference may be that it now doesn't get autofocus via attribute.
Author
Owner

@gsantner commented on GitHub (Aug 19, 2017):

@daviian Pulled in current HEAD, no still happening (at least on my ff 55)

@gsantner commented on GitHub (Aug 19, 2017): @daviian Pulled in current HEAD, no still happening (at least on my ff 55)
Author
Owner

@daviian commented on GitHub (Aug 19, 2017):

I have just tested it with ff 55 again and I can't reproduce the issue.

@daviian commented on GitHub (Aug 19, 2017): I have just tested it with ff 55 again and I can't reproduce the issue.
Author
Owner
@gsantner commented on GitHub (Aug 19, 2017): I recorded a screencast, with Firefox 55.0.1, and zero addons. Git commit https://github.com/go-gitea/gitea/commit/e7653a67a10483aa0e2c9cc019abe9021e8df9ce . * <https://b2aeaa58a57a200320db-8b65b95250e902c437b256b5abf3eac7.ssl.cf5.rackcdn.com/media_entries/14958/gitea_issue_816.web> * <https://goblinrefuge.com/mediagoblin/u/gsantner/m/gitea-issue-816-demo/> ![screenshot_2017-08-19__17-18_1](https://user-images.githubusercontent.com/6735650/29487982-6f14ff8e-8502-11e7-8e2a-5b0b7565db79.png)
Author
Owner

@daviian commented on GitHub (Aug 19, 2017):

I see! So it only jumps if the input box with autofocus isn't in viewport.

@daviian commented on GitHub (Aug 19, 2017): I see! So it only jumps if the input box with autofocus isn't in viewport.
Author
Owner

@daviian commented on GitHub (Aug 19, 2017):

As of https://bugzilla.mozilla.org/show_bug.cgi?id=630493 it is a desired behaviour of firefox, therefore imo not relevant to gitea!?

@daviian commented on GitHub (Aug 19, 2017): As of https://bugzilla.mozilla.org/show_bug.cgi?id=630493 it is a desired behaviour of firefox, therefore imo not relevant to gitea!?
Author
Owner

@gsantner commented on GitHub (Aug 19, 2017):

I don't know how other sites do this, but e.g. try that on https://www.dict.cc/ . There is too autofocus, but the page stays at his position after refresh. I tested various other pages too, e.g. https://duckduckgo.com . I don't know if that linked bug is really related to that. BTW: Previously, it just jumped to the bottom, but at some point the search was introduced, and now this is happening

@gsantner commented on GitHub (Aug 19, 2017): I don't know how other sites do this, but e.g. try that on <https://www.dict.cc/> . There is too autofocus, but the page stays at his position after refresh. I tested various other pages too, e.g. <https://duckduckgo.com> . I don't know if that linked bug is really related to that. BTW: Previously, it just jumped to the bottom, but at some point the search was introduced, and now this is happening
Author
Owner

@daviian commented on GitHub (Aug 19, 2017):

As far as I can say after testing around, the issue doesn't appear if searchbox above repositories and searchbox on explore page doesn't have autofocus. So linked bug is definitely related imo.

@daviian commented on GitHub (Aug 19, 2017): As far as I can say after testing around, the issue doesn't appear if searchbox above repositories and searchbox on explore page doesn't have autofocus. So linked bug is definitely related imo.
Author
Owner

@gsantner commented on GitHub (Aug 19, 2017):

So confirmed upstream bug / "feature" ?

@gsantner commented on GitHub (Aug 19, 2017): So confirmed upstream bug / "feature" ?
Author
Owner

@daviian commented on GitHub (Aug 19, 2017):

I am not in the position to decide on this. @lunny What do you say?

@daviian commented on GitHub (Aug 19, 2017): I am not in the position to decide on this. @lunny What do you say?
Author
Owner

@lafriks commented on GitHub (Aug 19, 2017):

This could be fixed removing autofocus from input in page and adding jqeury element .focus()

@lafriks commented on GitHub (Aug 19, 2017): This could be fixed removing `autofocus` from input in page and adding jqeury element `.focus()`
Author
Owner

@bkcsoft commented on GitHub (Aug 19, 2017):

@lafriks Or vue this.$$.inputElm.focus(); :trollface: https://stackoverflow.com/questions/34941829/setting-focus-of-an-input-element-in-vue-js

@bkcsoft commented on GitHub (Aug 19, 2017): @lafriks Or vue `this.$$.inputElm.focus();` :trollface: https://stackoverflow.com/questions/34941829/setting-focus-of-an-input-element-in-vue-js
Author
Owner

@daviian commented on GitHub (Aug 19, 2017):

@lafriks Seems to be an issue in jquery.focus() too. https://stackoverflow.com/questions/4898203/jquery-focus-without-scroll

@bkcsoft This
2c3a229a3c/public/js/index.js (L1708)
leads to the same issue. Had to comment it out to prevent jumping in FF.

This is the code from the new repo search Vue component

@daviian commented on GitHub (Aug 19, 2017): @lafriks Seems to be an issue in jquery.focus() too. https://stackoverflow.com/questions/4898203/jquery-focus-without-scroll @bkcsoft This https://github.com/go-gitea/gitea/blob/2c3a229a3c4cc3e86c5a1130bbd058ba78022a6a/public/js/index.js#L1708 leads to the same issue. Had to comment it out to prevent jumping in FF. This is the code from the new repo search Vue component
Author
Owner

@tboerger commented on GitHub (Aug 20, 2017):

Closing as wontfix since it's an browser issue and not related to gitea.

@tboerger commented on GitHub (Aug 20, 2017): Closing as wontfix since it's an browser issue and not related to gitea.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#309