This repository was archived by the owner on Oct 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 77
88define ( [ "jquery" ,
99 "../jquery.mobile.buttonMarkup" ,
10- "./forms/button" ,
1110 "../jquery.mobile.widget" ] , function ( $ ) {
1211//>>excludeEnd("jqmBuildExclude");
1312( function ( $ , undefined ) {
@@ -101,8 +100,18 @@ define( [ "jquery",
101100 }
102101 } ) ;
103102
104- $ ( document ) . bind ( "pagecreate create" , function ( e ) {
105- $ . mobile . controlgroup . prototype . enhanceWithin ( e . target , true ) ;
103+ // TODO: Implement a mechanism to allow widgets to become enhanced in the
104+ // correct order when their correct enhancement depends on other widgets in
105+ // the page being correctly enhanced already.
106+ //
107+ // For now, we wait until dom-ready to attach the controlgroup's enhancement
108+ // hook, because by that time, all the other widgets' enhancement hooks should
109+ // already be in place, ensuring that all widgets that need to be grouped will
110+ // already have been enhanced by the time the controlgroup is created.
111+ $ ( function ( ) {
112+ $ ( document ) . bind ( "pagecreate create" , function ( e ) {
113+ $ . mobile . controlgroup . prototype . enhanceWithin ( e . target , true ) ;
114+ } ) ;
106115 } ) ;
107116} ) ( jQuery ) ;
108117//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
You can’t perform that action at this time.
0 commit comments