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

Commit

Permalink
Added: blur, click, focus, select, setSelectionRange, setRangeText, s…
Browse files Browse the repository at this point in the history
…tepDown, stepUp method forwarders
  • Loading branch information
dominiklessel committed Jul 8, 2014
1 parent e211a1e commit 0866136
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions core-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,50 @@
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();
},

blur: function() {
this.$.input.blur();
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 0866136

Please sign in to comment.