Skip to content
This repository
Browse code

Fixes #3580 — Fixes radio/checkbox rendering inside dialogs when not …

…wrapped in fieldcontain. Also addresses some general brokenness for radio/checkboxes in dialogs.
  • Loading branch information...
commit c926aa1fc4dd6a3ff6d978b5ffa5a12cd188cddb 1 parent 7704826
Mat Marquis authored February 17, 2012
2  js/jquery.mobile.forms.checkboxradio.js
@@ -21,7 +21,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
21 21
 			input = this.element,
22 22
 			// NOTE: Windows Phone could not find the label through a selector
23 23
 			// filter works though.
24  
-			label = input.closest( "form,fieldset,:jqmData(role='page')" ).find( "label" ).filter( "[for='" + input[ 0 ].id + "']" ),
  24
+			label = $( input ).closest( "form,fieldset,:jqmData(role='page'),:jqmData(role='dialog')" ).find( "label" ).filter( "[for='" + input[ 0 ].id + "']" ),
25 25
 			inputtype = input.attr( "type" ),
26 26
 			mini = input.closest( "form,fieldset" ).jqmData('mini'),
27 27
 			checkedState = inputtype + "-on",

0 notes on commit c926aa1

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