Fix clicking on the checkbox O_o

master
Vitaliy Filippov 2014-09-04 13:25:17 +00:00
parent b70150f3db
commit 2c39146394
1 changed files with 3 additions and 4 deletions

View File

@ -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