Skip to content

Commit

Permalink
Update codemirror to 5.52.2
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Apr 11, 2020
1 parent d9d2c1b commit 9701a63
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
8 changes: 5 additions & 3 deletions js/vendor/codemirror/lib/codemirror.js
Expand Up @@ -4148,6 +4148,8 @@
update.visible = visibleLines(cm.display, cm.doc, viewport);
if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)
{ break }
} else if (first) {
update.visible = visibleLines(cm.display, cm.doc, viewport);
}
if (!updateDisplayIfNeeded(cm, update)) { break }
updateHeightsInViewport(cm);
Expand Down Expand Up @@ -8806,7 +8808,7 @@

ContentEditableInput.prototype.prepareSelection = function () {
var result = prepareSelection(this.cm, false);
result.focus = this.cm.state.focused;
result.focus = document.activeElement == this.div;
return result
};

Expand Down Expand Up @@ -8902,7 +8904,7 @@

ContentEditableInput.prototype.focus = function () {
if (this.cm.options.readOnly != "nocursor") {
if (!this.selectionInEditor())
if (!this.selectionInEditor() || document.activeElement != this.div)
{ this.showSelection(this.prepareSelection(), true); }
this.div.focus();
}
Expand Down Expand Up @@ -9734,7 +9736,7 @@

addLegacyProps(CodeMirror);

CodeMirror.version = "5.52.0";
CodeMirror.version = "5.52.2";

return CodeMirror;

Expand Down
2 changes: 1 addition & 1 deletion js/vendor/codemirror/mode/javascript/javascript.js
Expand Up @@ -417,7 +417,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
}
function parenExpr(type) {
if (type != "(") return pass()
return cont(pushlex(")"), expression, expect(")"), poplex)
return cont(pushlex(")"), maybeexpression, expect(")"), poplex)
}
function expressionInner(type, value, noComma) {
if (cx.state.fatArrowAt == cx.stream.start) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"bootstrap": "^4.4.1",
"codemirror": "5.52.0",
"codemirror": "5.52.2",
"jquery": "3.5.0",
"jquery-migrate": "3.2.0",
"jquery-mousewheel": "3.1.13",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -498,10 +498,10 @@ clone-regexp@^2.1.0:
dependencies:
is-regexp "^2.0.0"

codemirror@5.52.0:
version "5.52.0"
resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.52.0.tgz#4dbd6aef7f0e63db826b9a23922f0c03ac75c0a7"
integrity sha512-K2UB6zjscrfME03HeRe/IuOmCeqNpw7PLKGHThYpLbZEuKf+ZoujJPhxZN4hHJS1O7QyzEsV7JJZGxuQWVaFCg==
codemirror@5.52.2:
version "5.52.2"
resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.52.2.tgz#c29e1f7179f85eb0dd17c0586fa810e4838ff584"
integrity sha512-WCGCixNUck2HGvY8/ZNI1jYfxPG5cRHv0VjmWuNzbtCLz8qYA5d+je4QhSSCtCaagyeOwMi/HmmPTjBgiTm2lQ==

collapse-white-space@^1.0.2:
version "1.0.5"
Expand Down

0 comments on commit 9701a63

Please sign in to comment.