Skip to content

Commit

Permalink
don't change text if it is already focused
Browse files Browse the repository at this point in the history
  • Loading branch information
mmangino committed May 17, 2010
1 parent efc109b commit e793a47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
7 changes: 4 additions & 3 deletions jquery.autofill.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
p_obj = obj;
obj = obj.next();
}

obj.css({color:options.defaultTextColor})
.val(options.value);
if(document.activeElement != obj[0]) {
obj.css({color:options.defaultTextColor})
.val(options.value);
}
obj.each(function() {
$(this.form).submit(function() {
if (obj.val() == options.value) {
Expand Down
10 changes: 2 additions & 8 deletions jquery.autofill.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e793a47

Please sign in to comment.