Skip to content

Commit d109558

Browse files
committed
Fix DND handle size on markdown cells
1 parent 16dd2ea commit d109558

2 files changed

Lines changed: 15 additions & 11 deletions

File tree

src/vs/workbench/contrib/notebook/browser/media/notebook.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,12 @@
396396
opacity: 1;
397397
}
398398

399+
.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-side {
400+
/** Overidden for code cells */
401+
top: 0px;
402+
bottom: 0px;
403+
}
404+
399405
.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-top,
400406
.monaco-workbench .notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-bottom {
401407
width: 100%;

src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -268,19 +268,17 @@ abstract class AbstractCellRenderer {
268268
this.notebookEditor.focus();
269269
}
270270

271-
if (templateData.focusIndicator) {
272-
if (actions.primary.length || actions.secondary.length) {
273-
templateData.container.classList.add('cell-has-toolbar-actions');
271+
if (actions.primary.length || actions.secondary.length) {
272+
templateData.container.classList.add('cell-has-toolbar-actions');
273+
if (isCodeCellRenderTemplate(templateData)) {
274274
templateData.focusIndicator.style.top = `${EDITOR_TOOLBAR_HEIGHT + EDITOR_TOP_MARGIN}px`;
275-
if (isCodeCellRenderTemplate(templateData)) {
276-
templateData.focusIndicatorRight.style.top = `${EDITOR_TOOLBAR_HEIGHT + EDITOR_TOP_MARGIN}px`;
277-
}
278-
} else {
279-
templateData.container.classList.remove('cell-has-toolbar-actions');
275+
templateData.focusIndicatorRight.style.top = `${EDITOR_TOOLBAR_HEIGHT + EDITOR_TOP_MARGIN}px`;
276+
}
277+
} else {
278+
templateData.container.classList.remove('cell-has-toolbar-actions');
279+
if (isCodeCellRenderTemplate(templateData)) {
280280
templateData.focusIndicator.style.top = `${EDITOR_TOP_MARGIN}px`;
281-
if (isCodeCellRenderTemplate(templateData)) {
282-
templateData.focusIndicatorRight.style.top = `${EDITOR_TOP_MARGIN}px`;
283-
}
281+
templateData.focusIndicatorRight.style.top = `${EDITOR_TOP_MARGIN}px`;
284282
}
285283
}
286284
};

0 commit comments

Comments
 (0)