Browse Source

Usability enhancement: Autocomplete: do NOT clear the typed text when the value does not match one of the possible values, but clear the actual underlying value so that the input field gets marked as "invalid" if it is mandatory.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3737 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 9 years ago
parent
commit
85bf2ba554
1 changed files with 1 additions and 1 deletions
  1. 1 1
      js/jquery.autocomplete.js

+ 1 - 1
js/jquery.autocomplete.js

@@ -321,7 +321,7 @@ $.Autocompleter = function(input, options) {
 							$input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") );
 							$input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") );
 						}
 						}
 						else {
 						else {
-							$input.val( "" );
+							//$input.val( "" );
 							$input.trigger("result", null);
 							$input.trigger("result", null);
 						}
 						}
 					}
 					}