diff --git a/news/2 Fixes/6580.md b/news/2 Fixes/6580.md new file mode 100644 index 000000000000..aa561e6c0150 --- /dev/null +++ b/news/2 Fixes/6580.md @@ -0,0 +1,6 @@ +Changed the way scrolling is treated. Now we only check for the position of the scroll, the size of the cell won't matter. +Still the interactive window will snap to the bottom if you already are at the bottom, and will stay in place if you are not. Like a chat window. +Tested to work with: +- regular code +- dataframes +- big and regular plots \ No newline at end of file diff --git a/src/datascience-ui/history-react/MainPanel.tsx b/src/datascience-ui/history-react/MainPanel.tsx index 5fdbbd56ec63..c8d9af4f3fd6 100644 --- a/src/datascience-ui/history-react/MainPanel.tsx +++ b/src/datascience-ui/history-react/MainPanel.tsx @@ -41,6 +41,7 @@ export class MainPanel extends React.Component private stackLimit = 10; private updateCount = 0; private renderCount = 0; + private internalScrollCount = 0; private editCellRef: Cell | null = null; private mainPanel: HTMLDivElement | null = null; private variableExplorerRef: React.RefObject; @@ -68,7 +69,8 @@ export class MainPanel extends React.Component editorOptions: this.computeEditorOptions(), currentExecutionCount: 0, debugging: false, - enableGather: getSettings && getSettings().enableGather + enableGather: getSettings && getSettings().enableGather, + isAtBottom: true }; // Add test state if necessary @@ -151,7 +153,7 @@ export class MainPanel extends React.Component
{this.renderVariablePanel(baseTheme)}
-
+
{this.renderContentPanel(baseTheme)}