@@ -55,10 +55,8 @@ return $.widget( "mobile.textinput", $.mobile.textinput, {
55
55
// Attach to the various you-have-become-visible notifications that the
56
56
// various framework elements emit.
57
57
// TODO: Remove all but the updatelayout handler once #6426 is fixed.
58
+ this . _handleShow ( "create" ) ;
58
59
this . _on ( true , this . document , {
59
-
60
- // TODO: Move to non-deprecated event
61
- "pageshow" : "_handleShow" ,
62
60
"popupbeforeposition" : "_handleShow" ,
63
61
"updatelayout" : "_handleShow" ,
64
62
"panelopen" : "_handleShow"
@@ -73,10 +71,10 @@ return $.widget( "mobile.textinput", $.mobile.textinput, {
73
71
// content has become visible, but the collapsible is still collapsed, so
74
72
// the autogrow textarea is still not visible.
75
73
_handleShow : function ( event ) {
76
- if ( $ . contains ( event . target , this . element [ 0 ] ) &&
77
- this . element . is ( ":visible" ) ) {
74
+ if ( event === "create" || ( $ . contains ( event . target , this . element [ 0 ] ) &&
75
+ this . element . is ( ":visible" ) ) ) {
78
76
79
- if ( event . type !== "popupbeforeposition" ) {
77
+ if ( event !== "create" && event . type !== "popupbeforeposition" ) {
80
78
this . _addClass ( "ui-textinput-autogrow-resize" ) ;
81
79
this . element
82
80
. animationComplete (
0 commit comments