As part of removing inline JavaScript in the admin [0], snippets such as
document.getElementById("id_old_password").focus() were replaced with the
HTML5 autofocus attribute.
This attribute has a possibly undesired behavior [1]: "*Warning*: this
attribute will force a page scroll to the field with the autofocus attribute
set, even within an iframe. So: know your audience, know the position of
the form."
This attribute could be problematic on the change list's admin's search
box: "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." [2]
Do you think we should remove autofocus from the search box to remedy this
complaint (and possibly go back to using JavaScript for that) or are there
any better solutions here?
[0]
https://github.com/django/django/commit/d638cdc42acec608c1967f44af6be32a477c239f
[1] http://www.wufoo.com/html5/attributes/02-autofocus.html
[2] https://code.djangoproject.com/ticket/27692
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/20d6d2bc-5e56-4531-91a3-9c4e01550296%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.