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