[Django] #27692: Remember scroll position in list screen after coming back from edit screen - remove autofocus from search field

34 views
Skip to first unread message

Django

unread,
Jan 5, 2017, 11:03:28 AM1/5/17
to django-...@googlegroups.com
#27692: Remember scroll position in list screen after coming back from edit screen
- remove autofocus from search field
-------------------------------------+-------------------------------------
Reporter: Ciske | Owner: nobody
Boekelo |
Type: Bug | Status: new
Component: | Version: 1.10
contrib.admin | Keywords: Remember scroll
Severity: Normal | position autofocus search field
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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)

--
Ticket URL: <https://code.djangoproject.com/ticket/27692>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 5, 2017, 11:18:04 AM1/5/17
to django-...@googlegroups.com
#27692: Remember scroll position in list screen after coming back from edit screen
- remove autofocus from search field
-------------------------------------+-------------------------------------
Reporter: Ciske Boekelo | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.10
Severity: Normal | Resolution:
Keywords: Remember scroll | Triage Stage: Accepted
position autofocus search field |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/27692#comment:1>

Django

unread,
Jan 6, 2017, 12:17:13 PM1/6/17
to django-...@googlegroups.com
#27692: Remember scroll position in list screen after coming back from edit screen
- remove autofocus from search field
-------------------------------------+-------------------------------------
Reporter: Ciske Boekelo | Owner: nobody
Type: Bug | Status: new

Component: contrib.admin | Version: 1.10
Severity: Normal | Resolution:
Keywords: Remember scroll | Triage Stage: Accepted
position autofocus search field |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (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?

--
Ticket URL: <https://code.djangoproject.com/ticket/27692#comment:2>

Django

unread,
Jan 6, 2017, 12:54:09 PM1/6/17
to django-...@googlegroups.com
#27692: Remember scroll position in list screen after coming back from edit screen
- remove autofocus from search field
-------------------------------------+-------------------------------------
Reporter: Ciske Boekelo | Owner: nobody
Type: Bug | Status: new

Component: contrib.admin | Version: 1.10
Severity: Normal | Resolution:
Keywords: Remember scroll | Triage Stage: Accepted
position autofocus search field |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

I started [https://groups.google.com/d/topic/django-
developers/CPfN3XLH95s/discussion a thread].

--
Ticket URL: <https://code.djangoproject.com/ticket/27692#comment:3>

Django

unread,
Jan 8, 2017, 3:31:17 PM1/8/17
to django-...@googlegroups.com
#27692: Remember scroll position in list screen after coming back from edit screen
- remove autofocus from search field
-------------------------------------+-------------------------------------
Reporter: Ciske Boekelo | Owner: nobody
Type: Bug | Status: new

Component: contrib.admin | Version: 1.10
Severity: Normal | Resolution:
Keywords: Remember scroll | Triage Stage: Accepted
position autofocus search field |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (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.

--
Ticket URL: <https://code.djangoproject.com/ticket/27692#comment:4>

Django

unread,
Nov 13, 2023, 11:28:49 AM11/13/23
to django-...@googlegroups.com
#27692: Remember scroll position in list screen after coming back from edit screen
- remove autofocus from search field
-------------------------------------+-------------------------------------
Reporter: Ciske Boekelo | Owner: nobody
Type: Bug | Status: new

Component: contrib.admin | Version: 1.10
Severity: Normal | Resolution:
Keywords: Remember scroll | Triage Stage: Accepted
position autofocus search field |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tom Carrick):

* cc: Tom Carrick (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/27692#comment:5>

Django

unread,
Dec 9, 2024, 1:42:01 AM12/9/24
to django-...@googlegroups.com
#27692: Remember scroll position in list screen after coming back from edit screen
- remove autofocus from search field
-------------------------------------+-------------------------------------
Reporter: Ciske Boekelo | Owner: SAI
| GANESH S
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.10
Severity: Normal | Resolution:
Keywords: Remember scroll | Triage Stage: Accepted
position autofocus search field |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by SAI GANESH S):

* cc: SAI GANESH S (added)
* owner: nobody => SAI GANESH S
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/27692#comment:6>

Django

unread,
Dec 10, 2024, 3:51:47 AM12/10/24
to django-...@googlegroups.com
#27692: Remember scroll position in list screen after coming back from edit screen
- remove autofocus from search field
-------------------------------------+-------------------------------------
Reporter: Ciske Boekelo | Owner: SAI
| GANESH S
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.10
Severity: Normal | Resolution:
Keywords: Remember scroll | Triage Stage: Accepted
position autofocus search field |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by SAI GANESH S):

Observation 1: I scroll down, click on an object to edit, and return
without making any edits (i.e., without clicking "Save"). The scroll
position is preserved.

Observation 2: I scroll down, click on an object to edit, and return after
making edits (i.e., by clicking "Save"). The scroll position is not
preserved.

I read through the conversation and inspected the search bar in Chrome
DevTools. I found that the autofocus attribute is set to false.

If I'm missing something, could someone guide me on which part of the code
I should be looking into?
--
Ticket URL: <https://code.djangoproject.com/ticket/27692#comment:7>
Reply all
Reply to author
Forward
0 new messages