Skip to content

Commit

Permalink
Merge pull request civicrm#30489 from civicrm/5.75
Browse files Browse the repository at this point in the history
5.75 to master
  • Loading branch information
eileenmcnaughton authored Jun 18, 2024
2 parents 5cb646a + 629bbb1 commit ecac570
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
8 changes: 7 additions & 1 deletion Civi/Angular/Page/Modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,13 @@ public static function buildAngularModules($event) {
public function digestJs($files) {
$scripts = [];
foreach ($files as $file) {
$scripts[] = \CRM_Utils_JS::stripComments(file_get_contents($file));
$content = file_get_contents($file);
if (str_contains($file, 'monaco-editor')) {
$scripts[] = $content;
}
else {
$scripts[] = \CRM_Utils_JS::stripComments($content);
}
}
$scripts = \CRM_Utils_JS::dedupeClosures(
$scripts,
Expand Down
17 changes: 0 additions & 17 deletions ang/crmMonaco.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,6 @@
});
}

// FIXME: This makes vertical scrolling much better, but horizontal is still weird.
var origOverflow;
function bodyScrollSuspend() {
if (origOverflow !== undefined) return;
origOverflow = $('body').css('overflow');
$('body').css('overflow', 'hidden');
}
function bodyScrollRestore() {
if (origOverflow === undefined) return;
$('body').css('overflow', origOverflow);
origOverflow = undefined;
}
editorEl.on('mouseenter', bodyScrollSuspend);
editorEl.on('mouseleave', bodyScrollRestore);
editor.onDidFocusEditorWidget(bodyScrollSuspend);
editor.onDidBlurEditorWidget(bodyScrollRestore);

crmMonaco.editor = editor;

$scope.$on('$destroy', function () {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
"ignore": [".*", "*.json", "*.md", "Makefile", "*/*"]
},
"monaco-editor": {
"url": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.25.2.tgz",
"url": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.49.0.tgz",
"path": "bower_components/monaco-editor",
"ignore": ["dev", "esm"]
},
Expand Down

0 comments on commit ecac570

Please sign in to comment.