Re: Use of HTML autofocus attribute in admin (#27692)

2017-09-05 Thread Alexander Lyabah
> If there were a way to autofocus on first page load only that would be 
the best, it might be possible with JS.

Yes, It should be possible by parsing document.referrer in JS.

On Monday, January 9, 2017 at 10:21:15 AM UTC+2, Adam Johnson wrote:
>
> I just found out that's it not new behavior in Django 1.9. The javascript 
>> autofocus that existed previously has the same effect.
>
>
> Oh yeah, so it does. Yes it's still annoying but changing the default 
> could be more confusing. If there were a way to autofocus on first page 
> load only that would be the best, it might be possible with JS.
>
> On 8 January 2017 at 20:33, Ciske Boekelo  > wrote:
>
>> 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.
>>
>> Op vrijdag 6 januari 2017 18:54:54 UTC+1 schreef Adam Johnson:
>>>
>>> I think we should remove it and maybe add the Javascript back, this is 
>>> going to affect many peoples' workflows, some of whom are in my 
>>> organization.
>>>
>>> On Friday, January 6, 2017 at 5:48:12 PM UTC, Tim Graham wrote:

 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 django-develop...@googlegroups.com .
>> To post to this group, send email to django-d...@googlegroups.com 
>> .
>> 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/d02bfbaa-be99-46da-9a11-a8fad7fac7cc%40googlegroups.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Adam
>

-- 
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 django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
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/0790d6ba-8107-4c75-8fbe-f8997ea26a58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Use of HTML autofocus attribute in admin (#27692)

2017-01-09 Thread Adam Johnson
>
> I just found out that's it not new behavior in Django 1.9. The javascript
> autofocus that existed previously has the same effect.


Oh yeah, so it does. Yes it's still annoying but changing the default could
be more confusing. If there were a way to autofocus on first page load only
that would be the best, it might be possible with JS.

On 8 January 2017 at 20:33, Ciske Boekelo  wrote:

> 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.
>
> Op vrijdag 6 januari 2017 18:54:54 UTC+1 schreef Adam Johnson:
>>
>> I think we should remove it and maybe add the Javascript back, this is
>> going to affect many peoples' workflows, some of whom are in my
>> organization.
>>
>> On Friday, January 6, 2017 at 5:48:12 PM UTC, Tim Graham wrote:
>>>
>>> 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/d638cdc42acec608
>>> c1967f44af6be32a477c239f
>>> [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 django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> 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/d02bfbaa-be99-46da-9a11-
> a8fad7fac7cc%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Adam

-- 
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 django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
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/CAMyDDM2v2_we-KFPmoDixkCW7tfgehvx7B_N1rpLR5WbwCX4yw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Use of HTML autofocus attribute in admin (#27692)

2017-01-08 Thread 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.

Op vrijdag 6 januari 2017 18:54:54 UTC+1 schreef Adam Johnson:
>
> I think we should remove it and maybe add the Javascript back, this is 
> going to affect many peoples' workflows, some of whom are in my 
> organization.
>
> On Friday, January 6, 2017 at 5:48:12 PM UTC, Tim Graham wrote:
>>
>> 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 django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
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/d02bfbaa-be99-46da-9a11-a8fad7fac7cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Use of HTML autofocus attribute in admin (#27692)

2017-01-06 Thread Karen Tracey
On Fri, Jan 6, 2017 at 12:48 PM, Tim Graham  wrote:

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


I personally find the existing auto-focus behavior more annoying than
helpful, as it seems I'm much more likely to want to navigate by cursor or
page down than search when I land on an admin list page, and it forces me
to first get the focus away from the search box before I can do what I
want. So I wouldn't mind if auto-focus went away entirely.

Having it not only grab the focus but scroll back to to the top of the page
would be extraordinarily annoying, let's please avoid doing that.

-- 
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 django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
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/CACS9radGBOdtFs6YbOgyMX%3DPL%3DqtK6kVYM-7bNUYAU2Z33RwEg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Use of HTML autofocus attribute in admin (#27692)

2017-01-06 Thread Adam Johnson
I think we should remove it and maybe add the Javascript back, this is 
going to affect many peoples' workflows, some of whom are in my 
organization.

On Friday, January 6, 2017 at 5:48:12 PM UTC, Tim Graham wrote:
>
> 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 django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
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/71125cb8-ba1a-4cde-99bc-e7360b2547dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Use of HTML autofocus attribute in admin (#27692)

2017-01-06 Thread Tim Graham
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 django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
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.