|
984 | 984 | (t.isWin = r == "win"),
|
985 | 985 | (t.isMac = r == "mac"),
|
986 | 986 | (t.isLinux = r == "linux"),
|
987 |
| - (t.isIE = |
988 |
| - navigator.appName == "Microsoft Internet Explorer" || |
989 |
| - navigator.appName.indexOf("MSAppHost") >= 0 |
990 |
| - ? parseFloat( |
991 |
| - (i.match( |
992 |
| - /(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/ |
993 |
| - ) || [])[1] |
994 |
| - ) |
995 |
| - : parseFloat( |
996 |
| - (i.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/) || |
997 |
| - [])[1] |
998 |
| - )), |
999 |
| - (t.isOldIE = t.isIE && t.isIE < 9), |
1000 | 987 | (t.isGecko = t.isMozilla =
|
1001 | 988 | (window.Controllers || window.controllers) &&
|
1002 | 989 | window.navigator.product === "Gecko"),
|
|
1167 | 1154 | : e.detail > 1
|
1168 | 1155 | ? (o++, o > 4 && (o = 1))
|
1169 | 1156 | : (o = 1);
|
1170 |
| - if (i.isIE) { |
1171 |
| - var c = Math.abs(e.clientX - u) > 5 || Math.abs(e.clientY - a) > 5; |
1172 |
| - if (!f || c) o = 1; |
1173 |
| - f && clearTimeout(f), |
1174 |
| - (f = setTimeout(function() { |
1175 |
| - f = null; |
1176 |
| - }, n[o - 1] || 600)), |
1177 |
| - o == 1 && ((u = e.clientX), (a = e.clientY)); |
1178 |
| - } |
1179 | 1157 | (e._clicks = o), r[s]("mousedown", e);
|
1180 | 1158 | if (o > 4) o = 0;
|
1181 | 1159 | else if (o > 1) return r[s](l[o], e);
|
|
1196 | 1174 | l = { 2: "dblclick", 3: "tripleclick", 4: "quadclick" };
|
1197 | 1175 | Array.isArray(e) || (e = [e]),
|
1198 | 1176 | e.forEach(function(e) {
|
1199 |
| - t.addListener(e, "mousedown", c), |
1200 |
| - i.isOldIE && t.addListener(e, "dblclick", h); |
| 1177 | + t.addListener(e, "mousedown", c); |
1201 | 1178 | });
|
1202 | 1179 | });
|
1203 | 1180 | var u =
|
|
1251 | 1228 | s || (f(), r(window, "focus", f));
|
1252 | 1229 | }
|
1253 | 1230 | });
|
1254 |
| - if (typeof window == "object" && window.postMessage && !i.isOldIE) { |
| 1231 | + if (typeof window == "object" && window.postMessage) { |
1255 | 1232 | var l = 1;
|
1256 | 1233 | t.nextTick = function(e, n) {
|
1257 | 1234 | n = n || window;
|
|
1427 | 1404 | s = e("../lib/dom"),
|
1428 | 1405 | o = e("../lib/lang"),
|
1429 | 1406 | u = i.isChrome < 18,
|
1430 |
| - a = i.isIE, |
1431 | 1407 | f = function(e, t) {
|
1432 | 1408 | function b(e) {
|
1433 | 1409 | if (h) return;
|
|
1447 | 1423 | }
|
1448 | 1424 | function R() {
|
1449 | 1425 | clearTimeout(q),
|
1450 |
| - (q = setTimeout( |
1451 |
| - function() { |
1452 |
| - p && ((n.style.cssText = p), (p = "")), |
1453 |
| - t.renderer.$keepTextAreaAtCursor == null && |
1454 |
| - ((t.renderer.$keepTextAreaAtCursor = !0), |
1455 |
| - t.renderer.$moveTextAreaToCursor()); |
1456 |
| - }, |
1457 |
| - i.isOldIE ? 200 : 0 |
1458 |
| - )); |
| 1426 | + (q = setTimeout(function() { |
| 1427 | + p && ((n.style.cssText = p), (p = "")), |
| 1428 | + t.renderer.$keepTextAreaAtCursor == null && |
| 1429 | + ((t.renderer.$keepTextAreaAtCursor = !0), |
| 1430 | + t.renderer.$moveTextAreaToCursor()); |
| 1431 | + }, 0)); |
1459 | 1432 | }
|
1460 | 1433 | var n = s.createElement("textarea");
|
1461 | 1434 | (n.className = "ace_text-input"),
|
|
1465 | 1438 | n.setAttribute("autocapitalize", "off"),
|
1466 | 1439 | n.setAttribute("spellcheck", !1),
|
1467 | 1440 | (n.style.opacity = "0"),
|
1468 |
| - i.isOldIE && (n.style.top = "-1000px"), |
1469 | 1441 | e.insertBefore(n, e.firstChild);
|
1470 | 1442 | var f = "",
|
1471 | 1443 | l = !1,
|
|
1529 | 1501 | } catch (n) {}
|
1530 | 1502 | return !t || t.parentElement() != e ? !1 : t.text == e.value;
|
1531 | 1503 | }));
|
1532 |
| - if (i.isOldIE) { |
1533 |
| - var S = !1, |
1534 |
| - x = function(e) { |
1535 |
| - if (S) return; |
1536 |
| - var t = n.value; |
1537 |
| - if (h || !t || t == f) return; |
1538 |
| - if (e && t == f[0]) return T.schedule(); |
1539 |
| - A(t), (S = !0), w(), (S = !1); |
1540 |
| - }, |
1541 |
| - T = o.delayedCall(x); |
1542 |
| - r.addListener(n, "propertychange", x); |
1543 |
| - var N = { 13: 1, 27: 1 }; |
1544 |
| - r.addListener(n, "keyup", function(e) { |
1545 |
| - h && (!n.value || N[e.keyCode]) && setTimeout(F, 0); |
1546 |
| - if ((n.value.charCodeAt(0) || 0) < 129) return T.call(); |
1547 |
| - h ? j() : B(); |
1548 |
| - }), |
1549 |
| - r.addListener(n, "keydown", function(e) { |
1550 |
| - T.schedule(50); |
1551 |
| - }); |
1552 |
| - } |
1553 | 1504 | var C = function(e) {
|
1554 | 1505 | l
|
1555 | 1506 | ? (l = !1)
|
|
1591 | 1542 | M = function(e, t, n) {
|
1592 | 1543 | var r = e.clipboardData || window.clipboardData;
|
1593 | 1544 | if (!r || u) return;
|
1594 |
| - var i = a || n ? "Text" : "text/plain"; |
| 1545 | + var i = n ? "Text" : "text/plain"; |
1595 | 1546 | try {
|
1596 | 1547 | return t ? r.setData(i, t) !== !1 : r.getData(i);
|
1597 | 1548 | } catch (e) {
|
|
1619 | 1570 | H = function(e) {
|
1620 | 1571 | var s = M(e);
|
1621 | 1572 | typeof s == "string"
|
1622 |
| - ? (s && t.onPaste(s, e), |
1623 |
| - i.isIE && setTimeout(b), |
1624 |
| - r.preventDefault(e)) |
| 1573 | + ? (s && t.onPaste(s, e), r.preventDefault(e)) |
1625 | 1574 | : ((n.value = ""), (c = !0));
|
1626 | 1575 | };
|
1627 | 1576 | r.addCommandKeyListener(n, t.onCommandKey.bind(t)),
|
|
1723 | 1672 | this.moveToMouse(e, !0);
|
1724 | 1673 | }),
|
1725 | 1674 | (this.moveToMouse = function(e, o) {
|
1726 |
| - if (!o && i.isOldIE) return; |
1727 | 1675 | p || (p = n.style.cssText),
|
1728 | 1676 | (n.style.cssText =
|
1729 | 1677 | (o ? "z-index:100000;" : "") +
|
1730 | 1678 | "height:" +
|
1731 | 1679 | n.style.height +
|
1732 |
| - ";" + |
1733 |
| - (i.isIE ? "opacity:0.1;" : "")); |
| 1680 | + ";"); |
1734 | 1681 | var u = t.container.getBoundingClientRect(),
|
1735 | 1682 | a = s.computedStyle(t.container),
|
1736 | 1683 | f = u.top + (parseInt(a.borderTopWidth) || 0),
|
|
1745 | 1692 | t.renderer.$keepTextAreaAtCursor &&
|
1746 | 1693 | (t.renderer.$keepTextAreaAtCursor = null),
|
1747 | 1694 | clearTimeout(q),
|
1748 |
| - i.isWin && !i.isOldIE && r.capture(t.container, h, R); |
| 1695 | + i.isWin && r.capture(t.container, h, R); |
1749 | 1696 | }),
|
1750 | 1697 | (this.onContextMenuClose = R);
|
1751 | 1698 | var q,
|
|
2493 | 2440 | }),
|
2494 | 2441 | (this.onMouseDrag = function(e) {
|
2495 | 2442 | var t = this.editor.container;
|
2496 |
| - if (s.isIE && this.state == "dragReady") { |
2497 |
| - var n = l( |
2498 |
| - this.mousedownEvent.x, |
2499 |
| - this.mousedownEvent.y, |
2500 |
| - this.x, |
2501 |
| - this.y |
2502 |
| - ); |
2503 |
| - n > 3 && t.dragDrop(); |
2504 |
| - } |
2505 | 2443 | if (this.state === "dragWait") {
|
2506 | 2444 | var n = l(
|
2507 | 2445 | this.mousedownEvent.x,
|
|
2972 | 2910 | ),
|
2973 | 2911 | r.addListener(u, "mousedown", n),
|
2974 | 2912 | r.addListener(f, "mousedown", n),
|
2975 |
| - i.isIE && |
2976 |
| - e.renderer.scrollBarV && |
2977 |
| - (r.addListener(e.renderer.scrollBarV.element, "mousedown", n), |
2978 |
| - r.addListener(e.renderer.scrollBarH.element, "mousedown", n)), |
2979 | 2913 | e.on("mousemove", function(n) {
|
2980 | 2914 | if (t.state || t.$dragDelay || !t.$dragEnabled) return;
|
2981 | 2915 | var r = e.renderer.screenToTextCoordinates(n.x, n.y),
|
|
3042 | 2976 | f = function() {
|
3043 | 2977 | s[s.state] && s[s.state](), (s.$mouseMoved = !1);
|
3044 | 2978 | };
|
3045 |
| - if (i.isOldIE && e.domEvent.type == "dblclick") |
3046 |
| - return setTimeout(function() { |
3047 |
| - a(e); |
3048 |
| - }); |
3049 | 2979 | (s.$onCaptureMouseMove = o),
|
3050 | 2980 | (s.releaseMouse = r.capture(this.editor.container, o, a));
|
3051 | 2981 | var l = setInterval(f, 20);
|
|
12306 | 12236 | (e.visibility = "hidden"),
|
12307 | 12237 | (e.position = "absolute"),
|
12308 | 12238 | (e.whiteSpace = "pre"),
|
12309 |
| - o.isIE < 8 ? (e["font-family"] = "inherit") : (e.font = "inherit"), |
| 12239 | + (e.font = "inherit"), |
12310 | 12240 | (e.overflow = t ? "hidden" : "visible");
|
12311 | 12241 | }),
|
12312 | 12242 | (this.checkForSizeChanges = function() {
|
|
12416 | 12346 | var g = function(e, t) {
|
12417 | 12347 | var n = this;
|
12418 | 12348 | (this.container = e || i.createElement("div")),
|
12419 |
| - (this.$keepTextAreaAtCursor = !o.isOldIE), |
| 12349 | + (this.$keepTextAreaAtCursor = true), |
12420 | 12350 | i.addCssClass(this.container, "ace_editor"),
|
12421 | 12351 | this.setTheme(t),
|
12422 | 12352 | (this.$gutter = i.createElement("div")),
|
|
0 commit comments