Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Enable some more IE workarounds in IE11

It seems that, though they changed their userAgent string
completely, they did keep most of their bugs.

Fixes copy/select-all from context menu.

Closes #1983
  • Loading branch information...
commit 6d184faf14344a62848c5871c1d39702b9f98c80 1 parent c1d75b7
@marijnh marijnh authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/codemirror.js
View
10 lib/codemirror.js
@@ -36,7 +36,7 @@ window.CodeMirror = (function() {
if (opera_version && opera_version >= 15) { opera = false; webkit = true; }
// Some browsers use the wrong event properties to signal cmd/ctrl on OS X
var flipCtrlCmd = mac && (qtwebkit || opera && (opera_version == null || opera_version < 12.11));
- var captureMiddleClick = gecko || (old_ie && !ie_lt9);
+ var captureMiddleClick = gecko || (ie && !ie_lt9);
// Optimize some code when these features are not used
var sawReadOnlySpans = false, sawCollapsedSpans = false;
@@ -1990,7 +1990,7 @@ window.CodeMirror = (function() {
// know one. These don't have to be accurate -- the result of them
// being wrong would just be a slight flicker on the first wheel
// scroll (if it is large enough).
- if (old_ie) wheelPixelsPerUnit = -.53;
+ if (ie) wheelPixelsPerUnit = -.53;
else if (gecko) wheelPixelsPerUnit = 15;
else if (chrome) wheelPixelsPerUnit = -.7;
else if (safari) wheelPixelsPerUnit = -1/3;
@@ -2241,7 +2241,7 @@ window.CodeMirror = (function() {
// Try to detect the user choosing select-all
if (display.input.selectionStart != null) {
- if (!old_ie || ie_lt9) prepareSelectAllHack();
+ if (!ie || ie_lt9) prepareSelectAllHack();
clearTimeout(detectingSelectAll);
var i = 0, poll = function(){
if (display.prevInput == "\u200b" && display.input.selectionStart == 0)
@@ -2253,7 +2253,7 @@ window.CodeMirror = (function() {
}
}
- if (old_ie && !ie_lt9) prepareSelectAllHack();
+ if (ie && !ie_lt9) prepareSelectAllHack();
if (captureMiddleClick) {
e_stop(e);
var mouseup = function() {
@@ -4515,7 +4515,7 @@ window.CodeMirror = (function() {
builder.measure = line == realLine && measure;
builder.pos = 0;
builder.addToken = builder.measure ? buildTokenMeasure : buildToken;
- if ((old_ie || webkit) && cm.getOption("lineWrapping"))
+ if ((ie || webkit) && cm.getOption("lineWrapping"))
builder.addToken = buildTokenSplitSpaces(builder.addToken);
var next = insertLineContent(line, builder, getLineStyles(cm, line));
if (measure && line == realLine && !builder.measuredSomething) {
Please sign in to comment.
Something went wrong with that request. Please try again.