CRM-13551 : includes 'point b)' fix as well as code improvement
[civicrm-core.git] / templates / CRM / Activity / Form / Activity.tpl
index 92cb46bdebb8b34766ca082f10629f151e899e2f..583221bc4f57b379c1f6e9585f1292cf1c50e4c7 100644 (file)
@@ -78,7 +78,7 @@
     cj( 'ul.token-input-list-facebook, div.token-input-dropdown-facebook' ).css( 'width', '450px' );
     cj('#source_contact_id').autocomplete( sourceDataUrl, { width : 180, selectFirst : false, hintText: hintText, matchContains: true, minChars: 1, max: {/literal}{crmSetting name="search_autocomplete_count" group="Search Preferences"}{literal}
     }).result( function(event, data, formatted) { cj( "#source_contact_qid" ).val( data[1] );
-      }).bind( 'click', function( ) { cj( "#source_contact_qid" ).val(''); });
+      }).bind( 'click', function( ) { if (!cj("#source_contact_id").val()) { cj( "#source_contact_qid" ).val(''); } });
   });
   </script>