Opened 11 months ago

Last modified 10 months ago

#27692 new Bug

Remember scroll position in list screen after coming back from edit screen - remove autofocus from search field

Reported by: Ciske Boekelo Owned by: nobody
Component: contrib.admin Version: 1.10
Severity: Normal Keywords: Remember scroll position autofocus search field
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When coming back to the list screen from the edit screen, the browser normally remembers your scroll position and restores it. This is desirable behavior if you want to work through a long lists of objects.

However, when you include a search field in the list screen, it has autofocus enabled, which prevents the scroll position from being restored. This is annoying and unhelpful. This is new behavior since django 1.9 I believe.

I suggest removing the autofocus, but I'm open to other suggestions (making it customizable somehow for example)

Change History (4)

comment:1 Changed 11 months ago by Tim Graham

Triage Stage: UnreviewedAccepted

I think that was done in 1.10 as part of removing inline JavaScript d638cdc42acec608c1967f44af6be32a477c239f (#25165). I guess it would be fine to remove autofocus although I'd like to see if anyone on the DevelopersMailingList has input.

comment:2 Changed 11 months ago by Ciske Boekelo

Thanks for your swift reply, Graham!
Would you like me to ask the question on the Django Developers Mailing List or have/will you?

comment:3 Changed 11 months ago by Tim Graham

I started a thread.

comment:4 Changed 10 months ago by Ciske Boekelo

I just found out that's it not new behavior in Django 1.9. The javascript autofocus that existed previously has the same effect. This doesn't change my request though, I'd still like the autofocus to be either removed or optional.

Note: See TracTickets for help on using tickets.
Back to Top