Browse files

obvious comment is obvious and #whitespace #style

  • Loading branch information...
1 parent 945bb1d commit 04dd5ecc6389ffa49c24c3895f2d72968f0cbc96 @laughinghan laughinghan committed Aug 7, 2011
Showing with 2 additions and 5 deletions.
  1. +2 −5 src/rootelements.js
View
7 src/rootelements.js
@@ -201,11 +201,8 @@ function createRoot(jQ, root, textbox, editable) {
var text = textarea.val();
if (text) {
textarea.val('');
- // textarea can contain more than one character
- // when typing quickly on slower platforms;
- // so process each character separately
- for (var i=0; i<text.length; i++) {
- cursor.parent.textInput(text.charAt(i));
+ for (var i = 0; i < text.length; i += 1) {
+ cursor.parent.textInput(text.charAt(i));
}
}
else {

0 comments on commit 04dd5ec

Please sign in to comment.