Skip to content

F5 / refresh scrolls to bottom #816

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

Closed
gsantner opened this issue Feb 1, 2017 · 25 comments
Closed

F5 / refresh scrolls to bottom #816

gsantner opened this issue Feb 1, 2017 · 25 comments
Labels
reviewed/wontfix The problem described in this issue/fixed in this pull request is not a problem we will fix

Comments

@gsantner
Copy link

gsantner commented Feb 1, 2017

  • Gitea version (or commit ref): 081485e
  • 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.

@lunny lunny modified the milestone: 1.1.0 Feb 2, 2017
@lunny lunny added the type/enhancement An improvement of existing functionality label Feb 2, 2017
@lunny lunny added this to the 1.x.x milestone Feb 2, 2017
@gsantner
Copy link
Author

gsantner commented 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

@lunny
Copy link
Member

lunny commented Feb 3, 2017

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

@unixfox
Copy link

unixfox commented 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.

@tboerger
Copy link
Member

tboerger commented 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.

@bkcsoft
Copy link
Member

bkcsoft commented Feb 12, 2017

I can also confirm it on Fx 51.0.1

@hiliev
Copy link

hiliev commented 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.

@kuklinistvan
Copy link

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

@gsantner
Copy link
Author

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

@kuklinistvan
Copy link

kuklinistvan commented 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

@gsantner
Copy link
Author

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

@gsantner
Copy link
Author

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

@daviian
Copy link
Member

daviian commented Aug 19, 2017

I think this is fixed by #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.

@gsantner
Copy link
Author

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

@daviian
Copy link
Member

daviian commented Aug 19, 2017

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

@gsantner
Copy link
Author

gsantner commented Aug 19, 2017

@daviian
Copy link
Member

daviian commented Aug 19, 2017

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

@daviian
Copy link
Member

daviian commented 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!?

@gsantner
Copy link
Author

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

@daviian
Copy link
Member

daviian commented 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.

@gsantner
Copy link
Author

So confirmed upstream bug / "feature" ?

@daviian
Copy link
Member

daviian commented Aug 19, 2017

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

@lafriks
Copy link
Member

lafriks commented Aug 19, 2017

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

@bkcsoft
Copy link
Member

bkcsoft commented Aug 19, 2017

@daviian
Copy link
Member

daviian commented Aug 19, 2017

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

@bkcsoft This

self.$refs.search.focus();

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

@tboerger tboerger added the reviewed/wontfix The problem described in this issue/fixed in this pull request is not a problem we will fix label Aug 20, 2017
@tboerger tboerger removed the type/enhancement An improvement of existing functionality label Aug 20, 2017
@tboerger tboerger removed this from the 1.x.x milestone Aug 20, 2017
@tboerger
Copy link
Member

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

@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
reviewed/wontfix The problem described in this issue/fixed in this pull request is not a problem we will fix
Projects
None yet
Development

No branches or pull requests

9 participants