Skip to content

Commit

Permalink
Fix typo in element reference
Browse files Browse the repository at this point in the history
The tests etc happened to work because it fell back on the
non-standard browser behavior of finding the element on the page with
the id of 'editor' when the editor variable did not exist in the
current scope in one case, and it found a variable bound in an outer
scope that happened to be the correct value in the other
  • Loading branch information
rhburrows committed Jul 12, 2011
1 parent 1f552b0 commit 2c069dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extras/selection.js
Expand Up @@ -69,9 +69,9 @@
}

if (this.selectionBegan < this.pointPosition()) {
return editor.slice(this.selectionBegan, this.pointPosition());
return this.slice(this.selectionBegan, this.pointPosition());
} else {
return editor.slice(this.pointPosition(), this.selectionBegan);
return this.slice(this.pointPosition(), this.selectionBegan);
}
};

Expand Down

0 comments on commit 2c069dc

Please sign in to comment.