File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ test( "custom selector expression", function() {
8282} ) ;
8383
8484test ( "jQuery usage" , function ( ) {
85- expect ( 15 ) ;
85+ expect ( 16 ) ;
8686
8787 var shouldCreate = false ;
8888
@@ -140,6 +140,9 @@ test( "jQuery usage", function() {
140140 ret = elem . testWidget ( "jQueryObject" ) ;
141141 equal ( ret [ 0 ] , document . body , "returned jQuery object" ) ;
142142 equal ( ret . end ( ) , elem , "stack preserved" ) ;
143+
144+ elem . testWidget ( "destroy" ) ;
145+ equal ( elem . data ( "ui-testWidget" ) , null ) ;
143146} ) ;
144147
145148test ( "direct usage" , function ( ) {
Original file line number Diff line number Diff line change @@ -163,9 +163,7 @@ $.widget.bridge = function( name, object ) {
163163
164164 if ( isMethodCall ) {
165165 this . each ( function ( ) {
166- // 1.9 BC for #7810
167- // TODO remove fallback to name
168- var instance = $ . data ( this , fullName ) || $ . data ( this , name ) ;
166+ var instance = $ . data ( this , fullName ) ;
169167 if ( ! instance ) {
170168 return $ . error ( "cannot call methods on " + name + " prior to initialization; " +
171169 "attempted to call method '" + options + "'" ) ;
@@ -183,9 +181,7 @@ $.widget.bridge = function( name, object ) {
183181 } ) ;
184182 } else {
185183 this . each ( function ( ) {
186- // 1.9 BC for #7810
187- // TODO remove fallback to name
188- var instance = $ . data ( this , fullName ) || $ . data ( this , name ) ;
184+ var instance = $ . data ( this , fullName ) ;
189185 if ( instance ) {
190186 instance . option ( options || { } ) . _init ( ) ;
191187 } else {
@@ -252,7 +248,7 @@ $.Widget.prototype = {
252248 // all event bindings should go through this._bind()
253249 this . element
254250 . unbind ( "." + this . widgetName )
255- . removeData ( this . widgetName ) ;
251+ . removeData ( this . widgetFullName ) ;
256252 this . widget ( )
257253 . unbind ( "." + this . widgetName )
258254 . removeAttr ( "aria-disabled" )
You can’t perform that action at this time.
0 commit comments