Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Checkboxradio: Filter for first label. Fixes #3879 - label conflict i…

…ssue
  • Loading branch information...
commit aca3959cc18e1f85db5d6c85877ee39a61ed7e60 1 parent 18df105
@jaspermdegroot jaspermdegroot authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 js/widgets/forms/checkboxradio.js
View
4 js/widgets/forms/checkboxradio.js
@@ -22,12 +22,12 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
var self = this,
input = this.element,
inheritAttr = function( input, dataAttr ) {
- return input.jqmData( dataAttr ) || input.closest( "form,fieldset" ).jqmData( dataAttr );
+ return input.jqmData( dataAttr ) || input.closest( "form, fieldset" ).jqmData( dataAttr );
},
// NOTE: Windows Phone could not find the label through a selector
// filter works though.
parentLabel = $( input ).closest( "label" ),
- label = parentLabel.length ? parentLabel : $( input ).closest( "form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')" ).find( "label" ).filter( "[for='" + input[0].id + "']" ),
+ label = parentLabel.length ? parentLabel : $( input ).closest( "form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')" ).find( "label" ).filter( "[for='" + input[0].id + "']" ).first(),
inputtype = input[0].type,
mini = inheritAttr( input, "mini" ),
checkedState = inputtype + "-on",
Please sign in to comment.
Something went wrong with that request. Please try again.