Commit 22b5c365 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch '217801-step-2-fix-editor-lite-scroll' into 'master'

Step 2 - Fix blob editor lite scroll

See merge request gitlab-org/gitlab!39251
parents 63e6aa62 b9310550
...@@ -4,7 +4,11 @@ export function initEditorLite({ el, ...args }) { ...@@ -4,7 +4,11 @@ export function initEditorLite({ el, ...args }) {
if (!el) { if (!el) {
throw new Error(`"el" parameter is required to initialize Editor`); throw new Error(`"el" parameter is required to initialize Editor`);
} }
const editor = new Editor(); const editor = new Editor({
scrollbar: {
alwaysConsumeMouseWheel: false,
},
});
editor.createInstance({ editor.createInstance({
el, el,
...args, ...args,
......
---
title: Fix scroll stuck on editor in snippets
merge_request: 39251
author:
type: fixed
...@@ -17,7 +17,11 @@ describe('Blob utilities', () => { ...@@ -17,7 +17,11 @@ describe('Blob utilities', () => {
describe('Monaco editor', () => { describe('Monaco editor', () => {
it('initializes the Editor Lite', () => { it('initializes the Editor Lite', () => {
utils.initEditorLite({ el: editorEl }); utils.initEditorLite({ el: editorEl });
expect(Editor).toHaveBeenCalled(); expect(Editor).toHaveBeenCalledWith({
scrollbar: {
alwaysConsumeMouseWheel: false,
},
});
}); });
it.each([[{}], [{ blobPath, blobContent, blobGlobalId }]])( it.each([[{}], [{ blobPath, blobContent, blobGlobalId }]])(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment