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).
This commit is contained in:
parent
263262a040
commit
86a483c3a4
|
@ -45,17 +45,18 @@ type NotebookRendererProps = NotebookRendererBaseProps & NotebookRendererDispatc
|
||||||
|
|
||||||
const decorate = (id: string, contentRef: ContentRef, cell_type: CellType, children: React.ReactNode) => {
|
const decorate = (id: string, contentRef: ContentRef, cell_type: CellType, children: React.ReactNode) => {
|
||||||
const Cell = () => (
|
const Cell = () => (
|
||||||
<DraggableCell id={id} contentRef={contentRef}>
|
// TODO Draggable and HijackScroll not working anymore. Fix or remove when reworking MarkdownCell.
|
||||||
<HijackScroll id={id} contentRef={contentRef}>
|
// <DraggableCell id={id} contentRef={contentRef}>
|
||||||
<CellCreator id={id} contentRef={contentRef}>
|
// <HijackScroll id={id} contentRef={contentRef}>
|
||||||
<CellLabeler id={id} contentRef={contentRef}>
|
<CellCreator id={id} contentRef={contentRef}>
|
||||||
<HoverableCell id={id} contentRef={contentRef}>
|
<CellLabeler id={id} contentRef={contentRef}>
|
||||||
{children}
|
<HoverableCell id={id} contentRef={contentRef}>
|
||||||
</HoverableCell>
|
{children}
|
||||||
</CellLabeler>
|
</HoverableCell>
|
||||||
</CellCreator>
|
</CellLabeler>
|
||||||
</HijackScroll>
|
</CellCreator>
|
||||||
</DraggableCell>
|
// </HijackScroll>
|
||||||
|
// </DraggableCell>
|
||||||
);
|
);
|
||||||
|
|
||||||
Cell.defaultProps = { cell_type };
|
Cell.defaultProps = { cell_type };
|
||||||
|
|
Loading…
Reference in New Issue