Permalink
Browse files

Fix typo in element reference

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...
1 parent 1f552b0 commit 2c069dc5f6c3b9748ba6bcde8144dd14707da21f @rhburrows committed Jul 12, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/extras/selection.js
@@ -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);
}
};

0 comments on commit 2c069dc

Please sign in to comment.