Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed the createRange() error that was occurring with WebKit

  • Loading branch information...
commit efa6a1e8867b745b841157e919a0055cb626d2c4 1 parent 1123112
Danish Khan authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  nicEdit.js
View
3  nicEdit.js
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.