Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
DataTable: row is selected when clicking on inputSwitch inside a column #3310
p:inputSwitch inside a p:dataTable with singleSelection mode
2) Expected behavior
Clicking any part of the switch should not changethe selection in the table only the switch itself.
3) Actual behavior
Clicking the label on the switch changes selection in the table, while clicking the handle part doesn't.
4) Steps to reproduce
5) Sample XHTML
6) Sample bean
Sample here: Kameecoding/primefaces-test@c156d9a
evaluates to true when clicking the label, because the event target is the span
well the Selector based on which the selection is triggered is only checking for a span with class
both using div and tagging these affected spans with
A more general fix could be a check to see if the element is contained within a component element.