From bcf3cae0584becfd6cba7bf7b97fd166c97ab392 Mon Sep 17 00:00:00 2001 From: Robert Treat Date: Tue, 27 Nov 2012 22:57:45 -0500 Subject: [PATCH] Fix an issue with population of FK fields using autocomplete. The fix comes from a comment by Dmytry Scherbina in a pull request originally submitted by Jakob Klein. --- js/ac_insert_row.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ac_insert_row.js b/js/ac_insert_row.js index d94edf5a..1101a99d 100644 --- a/js/ac_insert_row.js +++ b/js/ac_insert_row.js @@ -176,7 +176,7 @@ with(jQuery('tr.acline')) { var a = jQuery(this).find('td > a.fkval'); for (i=0; i < a.length; i++) { - jQuery('input[name="values['+ a[i].name +']"]').val(a[i].innerHTML); + jQuery('input[name="values['+ a[i].name +']"]').val(jQuery(a[i]).text()); } hideAc(); }); -- 2.39.5