diff --git a/src/editor/Editor.js b/src/editor/Editor.js index d8a96b69680..f5ff28eae27 100644 --- a/src/editor/Editor.js +++ b/src/editor/Editor.js @@ -907,7 +907,7 @@ define(function (require, exports, module) { /** Returns true if the editor has focus */ Editor.prototype.hasFocus = function () { // The CodeMirror instance wrapper has a "CodeMirror-focused" class set when focused - return $(this.getRootElement()).hasClass("CodeMirror-focused"); + return $(this.getScrollerElement()).hasClass("CodeMirror-focused"); }; /** diff --git a/src/styles/brackets_codemirror_override.less b/src/styles/brackets_codemirror_override.less index 1d6b9f948d0..cc2a27dc50b 100644 --- a/src/styles/brackets_codemirror_override.less +++ b/src/styles/brackets_codemirror_override.less @@ -112,14 +112,14 @@ .CodeMirror pre.CodeMirror-cursor { visibility: hidden; } - .CodeMirror.CodeMirror-focused pre.CodeMirror-cursor { + .CodeMirror .CodeMirror-focused pre.CodeMirror-cursor { visibility: visible; } .CodeMirror div.CodeMirror-selected { background: #d9d9d9; } - .CodeMirror.CodeMirror-focused div.CodeMirror-selected { + .CodeMirror .CodeMirror-focused div.CodeMirror-selected { background: #d2dcf8; } .CodeMirror .CodeMirror-gutter { diff --git a/src/thirdparty/CodeMirror2 b/src/thirdparty/CodeMirror2 index ea75addd490..6e82bddcec3 160000 --- a/src/thirdparty/CodeMirror2 +++ b/src/thirdparty/CodeMirror2 @@ -1 +1 @@ -Subproject commit ea75addd4905706438ec1305044f24f13e6b8842 +Subproject commit 6e82bddcec3df4f52e9b5debe44d8859f8407d3b