mirror of
https://github.com/ansible/awx.git
synced 2026-02-27 07:56:06 -03:30
Merge pull request #3592 from keithjgrant/code-mirror-fixes
Code Mirror: prevent console errors when CM parses invalid syntax Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
@@ -17,10 +17,12 @@ function atCodeMirrorModalController (
|
|||||||
} else if ($scope.disabled === 'false') {
|
} else if ($scope.disabled === 'false') {
|
||||||
$scope.disabled = false;
|
$scope.disabled = false;
|
||||||
}
|
}
|
||||||
const editor = $(`${CodeMirrorModalID} .CodeMirror`)[0].CodeMirror;
|
const editor = $(`${CodeMirrorModalID} .CodeMirror`)[0];
|
||||||
const height = $(ModalHeight).height() - $(ModalHeader).height() -
|
if (editor) {
|
||||||
$(ModalFooter).height() - 100;
|
const height = $(ModalHeight).height() - $(ModalHeader).height() -
|
||||||
editor.setSize('100%', height);
|
$(ModalFooter).height() - 100;
|
||||||
|
editor.CodeMirror.setSize('100%', height);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggle () {
|
function toggle () {
|
||||||
|
|||||||
Reference in New Issue
Block a user