Skip to content

Commit

Permalink
Don't set maxlength to 0 if none is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
goldfire committed Dec 30, 2013
1 parent 2fc7475 commit e614ce5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions CanvasInput.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* CanvasInput v1.1.1
* CanvasInput v1.1.2
* http://goldfirestudios.com/blog/108/CanvasInput-HTML5-Canvas-Text-Input
*
* (c) 2013, James Simpson of GoldFire Studios
Expand Down Expand Up @@ -125,7 +125,9 @@
self._hiddenInput.style.top = (self._y + self._extraY + (self._canvas ? self._canvas.offsetTop : 0)) + 'px';
self._hiddenInput.style.width = self._width;
self._hiddenInput.style.zIndex = 0;
self._hiddenInput.maxLength = self._maxlength;
if (self._maxlength) {
self._hiddenInput.maxLength = self._maxlength;
}
document.body.appendChild(self._hiddenInput);
self._hiddenInput.value = self._value;

Expand Down
Loading

0 comments on commit e614ce5

Please sign in to comment.