|
|
|
@ -251,7 +251,7 @@ SimpleAutocomplete.prototype.makeItem = function(index, item) |
|
|
|
|
l.htmlFor = c.id; |
|
|
|
|
l.innerHTML = item[0]; |
|
|
|
|
d.appendChild(l); |
|
|
|
|
addListener(c, 'click', this.preventCheck); |
|
|
|
|
addListener(l, 'click', this.preventCheck); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
d.innerHTML = item[0]; |
|
|
|
@ -412,11 +412,10 @@ SimpleAutocomplete.prototype.enable = function() |
|
|
|
|
|
|
|
|
|
// *** Event handlers ***
|
|
|
|
|
|
|
|
|
|
// Prevent default action on checkbox
|
|
|
|
|
// Prevent propagating label click to checkbox
|
|
|
|
|
SimpleAutocomplete.prototype.preventCheck = function(ev) |
|
|
|
|
{ |
|
|
|
|
ev = ev||window.event; |
|
|
|
|
return stopEvent(ev, true, true); |
|
|
|
|
return stopEvent(ev||window.event, false, true); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// Cancel event propagation
|
|
|
|
|