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 7
7
8
8
define ( [ "jquery" ,
9
9
"../jquery.mobile.buttonMarkup" ,
10
- "./forms/button" ,
11
10
"../jquery.mobile.widget" ] , function ( $ ) {
12
11
//>>excludeEnd("jqmBuildExclude");
13
12
( function ( $ , undefined ) {
@@ -101,8 +100,18 @@ define( [ "jquery",
101
100
}
102
101
} ) ;
103
102
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
+ } ) ;
106
115
} ) ;
107
116
} ) ( jQuery ) ;
108
117
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
You can’t perform that action at this time.
0 commit comments