Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebook sticky scroll does not show correct element based viewport #211122

Open
isidorn opened this issue Apr 23, 2024 · 2 comments
Open

Notebook sticky scroll does not show correct element based viewport #211122

isidorn opened this issue Apr 23, 2024 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-sticky-scroll Sticky Scroll in Notebook Editor

Comments

@isidorn
Copy link
Contributor

isidorn commented Apr 23, 2024

Testing #210961

Open the attached file. Rename to .ipynb
Navigate to the middle of the file (for example where Header 10 is mentioned).
Notice how the sticky scroll outline shows the wrong element. It is not based on keyboard focus, or what is at the screen. It seems like it is a couple of cells off in the computation.

Image

Header 10 is off screen. It is one page above.

Image

test.json

@amunger
Copy link
Contributor

amunger commented Apr 23, 2024

I saw something similar, header 3.1 only shows up just before 3.2
Recording 2024-04-23 at 10 04 54

@DonJayamanne
Copy link
Contributor

Yes, I too can replicate this in stable.

Sample ipynb
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Header 10\n",
    "\n",
    "## Header 20\n",
    "\n",
    "### header 30\n",
    "\n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   \n",
    "Large contents   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "metadata": {}
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n"
     ]
    }
   ],
   "source": [
    "print(1)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Header 1\n",
    "\n",
    "## Header 2\n",
    "\n",
    "### header 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "metadata": {}
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n"
     ]
    }
   ],
   "source": [
    "print(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Header 1\n",
    "\n",
    "## Header 2\n",
    "\n",
    "### header 3"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 1234"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Header 1\n",
    "\n",
    "## Header 2\n",
    "\n",
    "### header 3"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".venv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}

@Yoyokrazy Yoyokrazy added notebook-sticky-scroll Sticky Scroll in Notebook Editor bug Issue identified by VS Code Team member as probable bug labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug notebook-sticky-scroll Sticky Scroll in Notebook Editor
Projects
None yet
Development

No branches or pull requests

4 participants