Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

magic-removal: Fixed #1063 -- Fixed admin JS bug in which many-to-man…

…y selections were lost after using 'Add another'

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2740 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 9b8332f7df6261c50ad5b32e8a49bc307027a285 1 parent 2d5d40a
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/admin/media/js/admin/RelatedObjectLookups.js
View
2  django/contrib/admin/media/js/admin/RelatedObjectLookups.js
@@ -39,7 +39,7 @@ function dismissAddAnotherPopup(win, newId, newRepr) {
if (elem.nodeName == 'SELECT') {
var o = new Option(newRepr, newId);
elem.options[elem.options.length] = o;
- elem.selectedIndex = elem.length - 1;
+ o.selected = true;
} else if (elem.nodeName == 'INPUT') {
elem.value = newId;
}
Please sign in to comment.
Something went wrong with that request. Please try again.