From d29cdcd2f9547d9661c8e72bd43f70352271f945 Mon Sep 17 00:00:00 2001 From: Jamie Appleseed Date: Sun, 11 Dec 2011 14:46:18 +0100 Subject: [PATCH] Fixing bug where 'copy-attributes-to-text-field' = false would prevent textfield from being inserted into DOM (credit: @dontangg) --- jquery.select-to-autocomplete.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jquery.select-to-autocomplete.js b/jquery.select-to-autocomplete.js index 38559be..f298925 100644 --- a/jquery.select-to-autocomplete.js +++ b/jquery.select-to-autocomplete.js @@ -55,10 +55,10 @@ THE SOFTWARE. attrs[key] = raw_attrs[i].nodeValue; } }; - return $text_field.attr( attrs ) - .val( $select_field.find('option:selected:first').text() ) - .insertAfter( $select_field ); } + return $text_field.attr( attrs ) + .val( $select_field.find('option:selected:first').text() ) + .insertAfter( $select_field ); }, extract_options: function( $select_field ) { var options = [];