Skip to content

Commit 55a47d6

Browse files
committed
enhanceWithin: make surre the elements passed to buttonMarkup are filtered properly first Fixes jquery-archive#6630 - Helpers: Pass the correct elements to buttonMarkup and reduce calls to jqmEnhanceable
1 parent d65f0db commit 55a47d6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

js/jquery.mobile.helpers.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ define( [ "jquery", "./jquery.mobile.ns", "./jquery.ui.core" ], function( jQuery
174174
// Enhance child elements
175175
enhanceWithin: function() {
176176
var index,
177-
widgetElements ={},
177+
widgetElements = {},
178178
that = this;
179179

180180
// Add no js class to elements
@@ -194,7 +194,8 @@ define( [ "jquery", "./jquery.mobile.ns", "./jquery.ui.core" ], function( jQuery
194194

195195
// Run buttonmarkup
196196
if ( $.fn.buttonMarkup ) {
197-
$( $.fn.buttonMarkup.initSelector ).not( $.mobile.page.prototype.keepNativeSelector() ).buttonMarkup();
197+
this.find( $.fn.buttonMarkup.initSelector ).not( $.mobile.page.prototype.keepNativeSelector() )
198+
.jqmEnhanceable().buttonMarkup();
198199
}
199200

200201
// Add classes for fieldContain

0 commit comments

Comments
 (0)