Permalink
Browse files

Textinput: Make option clearBtn work at runtime

  • Loading branch information...
allsteady authored and gabrielschulhof committed Oct 25, 2013
1 parent 5190a95 commit e3761c2a6ef444023139d9163ab02a7f1f656f3d
Showing with 4 additions and 3 deletions.
  1. +4 −3 js/widgets/forms/clearButton.js
@@ -91,7 +91,7 @@ define( [
_setOptions: function( options ) {
this._super( options );
if ( options.clearbtn !== undefined && !this.element.is( "textarea, :jqmData(type='range')" ) ) {
if ( options.clearBtn !== undefined && !this.element.is( "textarea, :jqmData(type='range')" ) ) {
if ( options.clearBtn ) {
this._addClearBtn();
} else {
@@ -100,7 +100,7 @@ define( [
}
if ( options.clearBtnText !== undefined && this._clearBtn !== undefined ) {
this._clearBtn.text( options.clearBtnText );
this._clearBtn.text( options.clearBtnText ).attr("title", options.clearBtnText);
}
},
@@ -114,7 +114,8 @@ define( [
_destroyClear: function() {
this.element.removeClass( "ui-input-has-clear" );
this._unbindClear()._clearBtn.remove();
this._unbindClear();
this._clearBtn.remove();
},
_destroy: function() {

0 comments on commit e3761c2

Please sign in to comment.