Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Passing only what's needed to Selection class.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed Feb 15, 2009
1 parent dd7fc2b commit 7312bfd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Source/MooEditable/MooEditable.js
Expand Up @@ -197,7 +197,7 @@ var MooEditable = new Class({
});
}

this.selection = new MooEditable.Selection(this);
this.selection = new MooEditable.Selection(this.win);

this.focus();

Expand Down Expand Up @@ -443,13 +443,12 @@ var MooEditable = new Class({

MooEditable.Selection = new Class({

initialize: function(editor){
this.win = editor.win;
this.doc = editor.doc;
initialize: function(win){
this.win = win;
},

getSelection: function(){
return (this.win.getSelection) ? this.win.getSelection() : this.doc.selection;
return (this.win.getSelection) ? this.win.getSelection() : this.win.document.selection;
},

getRange: function(){
Expand Down

0 comments on commit 7312bfd

Please sign in to comment.