Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Merge pull request #14 from dominiklessel/master
Browse files Browse the repository at this point in the history
Added: blur, click, focus, select, setSelectionRange, setRangeText, stepDown, stepUp method forwarders
  • Loading branch information
Yvonne Yip committed Jul 16, 2014
2 parents 2149202 + 0866136 commit df1e12f
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions core-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,52 @@
inputBlurAction: function() {
// re-fire non-bubbling event
this.fire('blur', null, this, false);
},

blur: function() {
// forward blur method to the internal input / textarea element
this.$.input.blur();
},

click: function() {
// forward click method to the internal input / textarea element
this.$.input.click();
},

focus: function() {
// forward focus method to the internal input / textarea element
this.$.input.focus();
},

select: function() {
// forward select method to the internal input / textarea element
this.$.input.focus();
},

setSelectionRange: function( selectionStart, selectionEnd, selectionDirection ) {
// forward setSelectionRange method to the internal input / textarea element
this.$.input.setSelectionRange( selectionStart, selectionEnd, selectionDirection );
},

setRangeText: function( replacement, start, end, selectMode ) {
// forward setRangeText method to the internal input element
if ( !this.multiline ) {
this.$.input.setRangeText( replacement, start, end, selectMode );
}
},

stepDown: function( n ) {
// forward stepDown method to the internal input element
if ( !this.multiline ) {
this.$.input.stepDown( n );
}
},

stepUp: function( n ) {
// forward stepUp method to the internal input element
if ( !this.multiline ) {
this.$.input.stepUp( n );
}
}

});
Expand Down

0 comments on commit df1e12f

Please sign in to comment.