From 86a483c3a47479e3354963dcb4f0db6f4d19e50c Mon Sep 17 00:00:00 2001 From: Laurent Nguyen Date: Wed, 27 Jan 2021 10:09:54 +0100 Subject: [PATCH] Fix notebook cell selection bug (#402) This fixes a bug that prevents getting focus to a text cell (effectively preventing editing) when the window height is small after double-clicking on a neighboring code cell. The issue is that selecting a text cell is broken likely because there's a behavior change in MonacoEditor that keeps the focus on the code cell. The selection issue will probably be resolved when migrating the text cell to Monaco (which will acquire and keep focus the same way), but for now, this will disable the faulty code which doesn't appear to work anymore (presumably auto-scrolling to the cell). --- .../NotebookRenderer/NotebookRenderer.tsx | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/Explorer/Notebook/NotebookRenderer/NotebookRenderer.tsx b/src/Explorer/Notebook/NotebookRenderer/NotebookRenderer.tsx index 796d145c6..bb16b103a 100644 --- a/src/Explorer/Notebook/NotebookRenderer/NotebookRenderer.tsx +++ b/src/Explorer/Notebook/NotebookRenderer/NotebookRenderer.tsx @@ -45,17 +45,18 @@ type NotebookRendererProps = NotebookRendererBaseProps & NotebookRendererDispatc const decorate = (id: string, contentRef: ContentRef, cell_type: CellType, children: React.ReactNode) => { const Cell = () => ( - - - - - - {children} - - - - - + // TODO Draggable and HijackScroll not working anymore. Fix or remove when reworking MarkdownCell. + // + // + + + + {children} + + + + // + // ); Cell.defaultProps = { cell_type };