Button label selector omits quotes / fails for ids with ":"
|Reported by:||jabouillei||Owned by:|
The button label selector uses the id of the checkbox without quoting it. Here is the relevent line of UI Button code:
labelSelector = "label[for=" + this.element.attr("id") + "]";
If the id contains a colon or some other interesting character labelSelector becomes, for example,
Here is a jsfiddle demonstrating the problem: http://jsfiddle.net/jgQaV/1/
I encountered the problem in 1.8.11 and reproduced it in 1.8.14. The fix is trivial:
labelSelector = "label[for=\"" + this.element.attr("id") + "\"]";
I'm making this change in a github fork and will request a pull in a few minutes.
Change History (5)
comment:2 Changed 4 years ago by Corey Frang
- Resolution set to fixed
- Status changed from new to closed