Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

IE9 getRange bug

  • Loading branch information...
commit 1dfe5f7013eb67542e525d586b542fe373cba659 1 parent 8af3306
Yuest Wang authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 _src/core/dom/Selection.js
View
4 _src/core/dom/Selection.js
@@ -68,7 +68,7 @@
testRange.collapse( position > 0 );
testRange.setEndPoint( position > 0 ? 'StartToStart' : 'EndToStart', range );
- distance = testRange.text.replace( /(\r\n|\r)/g, '\n' ).length;
+ distance = testRange.text.replace( /(\r\n|\r)/g, ie && browser.version == 9 ? '' : '\n' ).length;
if ( !distance ) {
return dtd.$empty[child.tagName] || dtd.$nonChild[child.tagName]?
@@ -362,4 +362,4 @@
};
-})();
+})();

0 comments on commit 1dfe5f7

Please sign in to comment.
Something went wrong with that request. Please try again.