Skip to content

Commit

Permalink
The beforeCreate event should be triggered in _create, not enhance.
Browse files Browse the repository at this point in the history
  • Loading branch information
arsduo committed Jun 3, 2011
1 parent d427bbc commit a8abe11
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/jquery.mobile.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ $.widget( "mobile.page", $.mobile.widget, {
},

_create: function() {
if ( this._trigger( "beforeCreate" ) === false ) {
return;
}

this.enhance();
},

Expand All @@ -39,10 +43,6 @@ $.widget( "mobile.page", $.mobile.widget, {

this.keepNative = ":jqmData(role='none'), :jqmData(role='nojs')" + (o.keepNative ? ", " + o.keepNative : "");

if ( this._trigger( "beforeCreate" ) === false ) {
return;
}

//some of the form elements currently rely on the presence of ui-page and ui-content
// classes so we'll handle page and content roles outside of the main role processing
// loop below.
Expand Down

0 comments on commit a8abe11

Please sign in to comment.