fixed the createRange() error that was occurring with WebKit

old-orig
Danish Khan 2010-09-20 14:00:39 -07:00
parent 11231121ba
commit efa6a1e886
1 changed files with 2 additions and 1 deletions

View File

@ -478,7 +478,8 @@ var nicEditorInstance = bkClass.extend({
getRng : function() {
var s = this.getSel();
if(!s) { return null; }
return (s.rangeCount > 0) ? s.getRangeAt(0) : s.createRange();
return (s.rangeCount > 0) ? s.getRangeAt(0) :
s.createRange && s.createRange() || document.createRange();
},
selRng : function(rng,s) {