Fix another bug: previously selected disabled item losed disabled class when hovering another itemn

master
Vitaliy Filippov 2013-10-18 14:27:07 +00:00
parent 7ce57a0af6
commit f328abfe03
2 changed files with 5 additions and 2 deletions

View File

@ -2,6 +2,7 @@
Homepage: http://yourcmc.ru/wiki/SimpleAutocomplete Homepage: http://yourcmc.ru/wiki/SimpleAutocomplete
License: MPL 2.0+ (http://www.mozilla.org/MPL/2.0/) License: MPL 2.0+ (http://www.mozilla.org/MPL/2.0/)
Version: 2013-10-18
(c) Vitaliy Filippov 2011-2013 (c) Vitaliy Filippov 2011-2013
Usage: Usage:
@ -269,7 +270,9 @@ SimpleAutocomplete.prototype.highlightItem = function(elem)
{ {
var c = this.getItem(); var c = this.getItem();
if (c) if (c)
c.className = 'hintItem'; {
c.className = this.items[this.selectedIndex][2] ? 'hintDisabledItem' : 'hintItem';
}
} }
this.selectedIndex = ni; this.selectedIndex = ni;
elem.className = 'hintActiveItem'; elem.className = 'hintActiveItem';

2
hinter.min.js vendored

File diff suppressed because one or more lines are too long