Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

IE9 getRange bug

  • Loading branch information...
commit 1dfe5f7013eb67542e525d586b542fe373cba659 1 parent 8af3306
Yuest Wang yuest authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 _src/core/dom/Selection.js
4 _src/core/dom/Selection.js
@@ -68,7 +68,7 @@
68 68
69 69 testRange.collapse( position > 0 );
70 70 testRange.setEndPoint( position > 0 ? 'StartToStart' : 'EndToStart', range );
71   - distance = testRange.text.replace( /(\r\n|\r)/g, '\n' ).length;
  71 + distance = testRange.text.replace( /(\r\n|\r)/g, ie && browser.version == 9 ? '' : '\n' ).length;
72 72 if ( !distance ) {
73 73 return dtd.$empty[child.tagName] || dtd.$nonChild[child.tagName]?
74 74
@@ -362,4 +362,4 @@
362 362 };
363 363
364 364
365   -})();
  365 +})();

0 comments on commit 1dfe5f7

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