Skip to content
This repository
Browse code

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

…ssue
  • Loading branch information...
commit aca3959cc18e1f85db5d6c85877ee39a61ed7e60 1 parent 18df105
Jasper de Groot authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  js/widgets/forms/checkboxradio.js
4  js/widgets/forms/checkboxradio.js
@@ -22,12 +22,12 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
22 22
 		var self = this,
23 23
 			input = this.element,
24 24
 			inheritAttr = function( input, dataAttr ) {
25  
-				return input.jqmData( dataAttr ) || input.closest( "form,fieldset" ).jqmData( dataAttr );
  25
+				return input.jqmData( dataAttr ) || input.closest( "form, fieldset" ).jqmData( dataAttr );
26 26
 			},
27 27
 			// NOTE: Windows Phone could not find the label through a selector
28 28
 			// filter works though.
29 29
 			parentLabel = $( input ).closest( "label" ),
30  
-			label = parentLabel.length ? parentLabel : $( input ).closest( "form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')" ).find( "label" ).filter( "[for='" + input[0].id + "']" ),
  30
+			label = parentLabel.length ? parentLabel : $( input ).closest( "form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')" ).find( "label" ).filter( "[for='" + input[0].id + "']" ).first(),
31 31
 			inputtype = input[0].type,
32 32
 			mini = inheritAttr( input, "mini" ),
33 33
 			checkedState = inputtype + "-on",

0 notes on commit aca3959

Please sign in to comment.
Something went wrong with that request. Please try again.