Controlling admin ManyToManyField widget with keyboard

39 views
Skip to first unread message

cool-RR

unread,
Feb 26, 2014, 7:12:09 AM2/26/14
to django...@googlegroups.com
Hi,

How do I control the admin ManyToManyField widget with the keyboard?


Thanks,
Ram.

C. Kirby

unread,
Feb 26, 2014, 11:43:10 AM2/26/14
to django...@googlegroups.com
While holding Ctrl (Command on a Mac), click the spacebar on the relations you want to select.
Spacebar handles the toggle action, ctrl(command) keeps you in multi-select mode

Ram Rachum

unread,
Feb 26, 2014, 12:28:05 PM2/26/14
to django-users
Sorry, space doesn't do the toggle. (Windows 7 Chrome.)


--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/VxFrne7x92E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f8d87dca-9ee6-44f3-b9bc-da7eef05fccc%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

C. Kirby

unread,
Feb 26, 2014, 1:08:27 PM2/26/14
to django...@googlegroups.com
It appears that multi-select form widgets cannot be keyboard controlled in chromium, and it is a known bug/non-implementation:

http://code.google.com/p/chromium/issues/detail?id=90172

Ram Rachum

unread,
Feb 26, 2014, 4:48:25 PM2/26/14
to django-users
Are you sure that you're not confusing the behavior of the select box with the toggle action? Because I'm having trouble with the toggle action, not the select box.


C. Kirby

unread,
Feb 26, 2014, 4:58:02 PM2/26/14
to django...@googlegroups.com
I don't think I am. A ManyToMany relation in admin is represented as a select-multiple html widget - is that what we are talking about?

The action that I described in my first message to select multiple elements in a select-multiple widget works in Firefox, Opera, and with a modifier in IE. It does not work in Chromium as indicated by the issue I linked to in the last message.

Please let me know if I am missing something in your question.

Regards,
~CK

Ram Rachum

unread,
Feb 26, 2014, 5:03:41 PM2/26/14
to django-users
The widget is a combination of two multiple select boxes and arrows to move items between boxes. I have no issues with the selecting part. I have an issue with the moving part.


C. Kirby

unread,
Feb 26, 2014, 5:40:24 PM2/26/14
to django...@googlegroups.com
Oh, sorry. That widget uses ModelAdmin.filter_horizontal (https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.filter_horizontal), it is not the standard admin ManyToMany widget. I just tested it in user permissions. I just got it to work by selecting(multiple) elements in one widget, tabbing to the move arrow, and clicking enter.
Maybe that will work for you?

Regards,
~CK

Ram Rachum

unread,
Feb 27, 2014, 2:33:05 PM2/27/14
to django-users
Ah, that works. It's not as nice as being able to move them without a tab dance, but it works.


Reply all
Reply to author
Forward
0 new messages