From b8d6d78de523719837180f43a5ad92a77e62fab0 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Thu, 16 Jul 2015 22:09:32 +0000 Subject: [PATCH] Clear input when idField is set and id is null --- hinter.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hinter.js b/hinter.js index 0f6d1e8..c714f23 100644 --- a/hinter.js +++ b/hinter.js @@ -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;