Commit b9310550 authored by Paul Slaughter's avatar Paul Slaughter

Add scrollbar fix to initEditorLite

*Why?*
- Previously you wouldn't be able to scroll
  past the file even if you're at the bottom
parent 160570ab
......@@ -4,7 +4,11 @@ export function initEditorLite({ el, blobPath, blobContent }) {
if (!el) {
throw new Error(`"el" parameter is required to initialize Editor`);
}
const editor = new Editor();
const editor = new Editor({
scrollbar: {
alwaysConsumeMouseWheel: false,
},
});
editor.createInstance({
el,
blobPath,
......
---
title: Fix scroll stuck on editor in snippets
merge_request: 39251
author:
type: fixed
......@@ -26,7 +26,11 @@ describe('Blob utilities', () => {
describe('Monaco editor', () => {
it('initializes the Editor Lite', () => {
utils.initEditorLite({ el: editorEl });
expect(Editor).toHaveBeenCalled();
expect(Editor).toHaveBeenCalledWith({
scrollbar: {
alwaysConsumeMouseWheel: false,
},
});
});
it('creates the instance with the passed parameters', () => {
......
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