Clear input when idField is set and id is null

master
Vitaliy Filippov 2015-07-16 22:09:32 +00:00
parent da1f70d67b
commit b8d6d78de5
1 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,7 @@
Homepage: http://yourcmc.ru/wiki/SimpleAutocomplete
License: MPL 2.0+ (http://www.mozilla.org/MPL/2.0/)
Version: 2015-05-08
Version: 2015-07-17
(c) Vitaliy Filippov 2011-2015
Usage:
@ -550,6 +550,8 @@ SimpleAutocomplete.prototype.onInputFocus = function()
// Called when input loses focus
SimpleAutocomplete.prototype.onInputBlur = function()
{
if (!this.skipHideCounter && this.idField && !this.idField.value)
this.input.value = '';
this.hide();
this.hasFocus = false;
return true;