#47 ✓resolved
JamLegend

SelectMultiple returns incorrect value in afterChange when numberOfCheckedBoxes == 0

Reported by JamLegend | February 24th, 2009 @ 06:29 PM | in 1.0

When numberofCheckedBoxes == 0, the value passed to afterChange is still the value of the last checked box, rather than empty, since no boxes are checked.

Patched function:


checkboxOnClick: function(checkbox){
	this.numberOfCheckedBoxes += (checkbox.checked) ? 1 : -1;
	this.scanCheckBoxes();
	this.notify('afterChange',this.numberOfCheckedBoxes == 0 ? "" : this.select.options[this.select.options.selectedIndex].value);
},

Comments and changes to this ticket

  • Nathan L Smith

    Nathan L Smith May 19th, 2009 @ 08:18 PM

    • State changed from “unconfirmed” to “confirmed”
  • Nathan L Smith

    Nathan L Smith May 24th, 2009 @ 11:28 AM

    • State changed from “confirmed” to “resolved”

    This method had another problem, as setting the value of a checkbox programtically (c.checked = true), will not fire a click event and (in|de)crement the value.

    numberOfCheckedBoxes now uses findAll to find the actual number of boxes checked and notifies with an empty string if none are checked.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

NOTE: Please do not open tickets here. If you have an issue, please open it on http://github.com/syntacticx/livepipe-ui/issues/

High quality widgets and controls for web 2.0 applications built using the Prototype JavaScript Framework. Each control is well tested, highly extensible, fully documented and degrades gracefully for non JavaScript enabled browsers where possible. MIT licensed and actively maintained.

People watching this ticket

Pages