Removing a window.opera-guarded part of code that was supposed to
"[c]ompensate for Opera's craziness converting \n to \r\n and counting
that as two chars". That craziness was apparently fixed some time ago
and the tests were now failing.
This makes the QUnit tests pass on Opera again.
Bug: 41931
Change-Id: Ide3a95e8e86ee65c8e1ea357aefa44dd2bbd4ed4
var start = opt.before.start,
end = opt.before.end;
- if ( window.opera ) {
- // Compensate for Opera's craziness converting \n to \r\n and counting that as two chars
- var newLinesBefore = opt.before.text.substring( 0, start ).split( '\n' ).length - 1,
- newLinesInside = opt.before.text.substring( start, end ).split( '\n' ).length - 1;
- start += newLinesBefore;
- end += newLinesBefore + newLinesInside;
- }
var options = $.extend( {}, opt.replace ); // Clone opt.replace
options.selectionStart = start;