kxu12348760 / dropdown-check-list

Automatically exported from code.google.com/p/dropdown-check-list
0 stars 0 forks source link

The change event doesn't always fire on the dynamically created checkboxes #251

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
** What steps will reproduce the problem?

Browse to the following sample: http://jsfiddle.net/8C7Qq/1/
Click on the selector to show the drop down, then repetitively click the 
checkboxes. 

** What is the expected output? What do you see instead?

The JavaScript event handler that was hooked up to the change event of the 
checkboxes makes sure that only 1 can be selected at once. Instead, you are 
sometimes able to select more than 1. This is because the change event 
sometimes does not fire. The problem is not observed when checkboxes are 
created manually, only when created through the dropdown-check-list plugin.

** What is your environment?
-- DropDownCheckList version: 1.4
-- jQuery version: 1.7.2
-- jQuery UI version: 1.8.18
-- Browser and version: Chrome 19, also applies to Firefox and IE

Thanks for looking into this. Would appreciate any tip on how to resolve the 
issue.

Original issue reported on code.google.com by xavier.p...@gmail.com on 25 Jun 2012 at 1:57

GoogleCodeExporter commented 8 years ago
Unfortunately, I do not have the capacity to address issues of externally 
developed functions that are wired to generated DDCL components. 

You have a couple of ways already built into DDCL to address limiting the user 
to a single selection.  You could go with radio buttons, which only allow one 
selection at a time, or you could use the 'onItemChanged' callback and impose a 
limit, as demonstrated on the TESTCASE page.

I will leave this issue open in case others in the community can help you.

Original comment by womohun...@ittrium.com on 25 Jun 2012 at 1:51

GoogleCodeExporter commented 8 years ago
Thanks for your reply Warren, I had missed the onItemChanged callback. Hooking 
up that same function to onItemChanged instead of the change event has solved 
the problem.

Original comment by xavier.p...@gmail.com on 26 Jun 2012 at 4:13

GoogleCodeExporter commented 8 years ago
If 'onItemChanged' meets your requirements, then I will close this issue.

Thanks for letting me know the outcome -- many issues are left in limbo after I 
post back a question or suggestion and never hear back from the originator. I 
appreciate your response.

Original comment by womohun...@ittrium.com on 26 Jun 2012 at 2:30