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

Running a cell moves focus in Jupyter Notebook #127213

Closed
rohitsathish opened this issue Jun 26, 2021 · 17 comments
Closed

Running a cell moves focus in Jupyter Notebook #127213

rohitsathish opened this issue Jun 26, 2021 · 17 comments
Assignees
Labels
info-needed Issue requires more information from poster notebook notebook-layout
Milestone

Comments

@rohitsathish
Copy link

Issue Type: Bug

Running a cell in jupyter notebooks moves the focus to the top of cell.

Expected behaviour: don't move focus on running a cell.

VS Code version: Code - Insiders 1.58.0-insider (3caebff, 2021-06-24T05:13:30.907Z)
OS version: Windows_NT x64 10.0.19041
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (4 x 2712)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 7.85GB (1.33GB free)
Process Argv --crash-reporter-id ae5030a7-252e-4fae-a3f4-65ef8037ef50
Screen Reader no
VM 0%
Extensions (19)
Extension Author (truncated) Version
path-intellisense chr 2.3.0
bracket-pair-colorizer-2 Coe 0.2.1
python-preview don 0.0.4
prettier-vscode esb 8.0.1
pythonsnippets frh 1.0.2
gc-excelviewer Gra 3.0.42
vscode-test-explorer hbe 2.20.4
RelativePath jak 1.4.0
vsc-python-indent Kev 1.14.2
vscode-python-test-adapter lit 0.6.8
python ms- 2021.7.922878407-dev
vscode-pylance ms- 2021.6.4-pre.1
jupyter ms- 2021.7.970869158
test-adapter-converter ms- 0.0.12
reload nat 0.0.6
code-spell-checker str 1.10.2
tabnine-vscode Tab 3.4.10
vscode-icons vsc 11.5.0
vscode-import-cost wix 2.15.0

(4 theme extensions excluded)

A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
pythonvspyt602:30291494
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256197
pythonvspyt639:30291487
pythontb:30258533
vspre833:30321513
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscus158:30321503
pythonvsuse255:30319630
vscorehov:30301224
vscod805cf:30301675
pythonvspyt200:30323110
vscextlangct:30310089
vsccppwt:30312692

@vscodebot
Copy link

vscodebot bot commented Jun 26, 2021

@kevinsu1015
Copy link

#127214 #127207

@rebornix
Copy link
Member

Running a cell in jupyter notebooks moves the focus to the top of cell

@rohitsathish can you elaborate a bit more on? A screen recording can help a lot.

@rebornix rebornix added the info-needed Issue requires more information from poster label Jun 28, 2021
@rohitsathish
Copy link
Author

@rebornix Sure, you can check out the behaviour in this screencast. I'm at the bottom of a long cell and run the cell, after its complete it shifts the focus to the top of the cell. I can confirm that it occurs both when running the cell with the 'run' button next to the cell and while using the ctrl + enter shortcut.

vscode.runing.cell.moves.focus.mp4

@pbotros
Copy link

pbotros commented Jul 12, 2021

Can confirm this - to add, this behavior is very annoying particularly when (a) a bunch of cells have been queued for execution, and so each cell's completion moves the UI unpredictably, and/or (b) a cell takes a non-trivial amount of time to execute, so I would want to start editing other cells while it's executing, but when the cell finishes, it moves focus away from my currently-editing cell. Thanks!

@WLDCH
Copy link

WLDCH commented Jul 19, 2021

Can confirm too, and it's really frustrating.

@pbotros
Copy link

pbotros commented Aug 5, 2021

@rebornix any updates on this issue? Doesn't seem like it should have the "needs more info" tag at this point. Would love to see progress on this, this is a very annoying regression!

@rebornix rebornix added notebook notebook-layout and removed info-needed Issue requires more information from poster labels Aug 6, 2021
@rebornix
Copy link
Member

rebornix commented Aug 6, 2021

Thanks the screen recording shared by #127213 (comment) is pretty helpful and I'll polish this experience.

@rebornix rebornix added this to the August 2021 milestone Aug 6, 2021
@rebornix rebornix added the bug Issue identified by VS Code Team member as probable bug label Aug 6, 2021
@rebornix
Copy link
Member

rebornix commented Aug 6, 2021

@pbotros may I ask if you are using the latest Stable or Insiders? I'm currently not able to reproduce this issue

recording (19)

if anyone of you can still reproduce, please provide a code sample and share the keyboard shortcut you use to run the cell, thanks!

@rebornix rebornix added info-needed Issue requires more information from poster and removed bug Issue identified by VS Code Team member as probable bug labels Aug 6, 2021
@pbotros
Copy link

pbotros commented Aug 11, 2021

Looks fixed to me now that I'm on latest Insiders (updated from 1.58.0-insider to 1.60.0-Insider). Seems like it's okay from my side to close this out. Thanks!

@Bebotron
Copy link

This issue persists for me. Here are my environment details

  • VS Code version: 1.58.2
  • Jupyter Extension version (available under the Extensions sidebar): 2021.8.1054968649
  • Python Extension version (available under the Extensions sidebar): 2021.8.1105858891
  • OS (Windows | Mac | Linux distro) and version: Linux x64 4.15.0-153-generic
  • Python and/or Anaconda version: python 3.8.3, conda 4.10.3
  • Type of virtual environment used: N/A
  • Jupyter server running: Local

And here is a gif of running a dummy matrix algebra cell using Shift+Enter
scroll

Initially opened this issue on #130711, found duplicates once it was transferred to this repo.

@pbotros
Copy link

pbotros commented Aug 13, 2021

@Bebotron see my comment, updating to 1.60.0 worked for me

@Bebotron
Copy link

@Bebotron see my comment, updating to 1.60.0 worked for me

Looks like 1.60 is not yet available on stable, so I'll have to be patient (I generally have bad experiences breaking things in insider versions of anything)

@rebornix rebornix modified the milestones: August 2021, September 2021 Aug 22, 2021
@rebornix
Copy link
Member

I'll move it to Sept Milestone and close it if @Bebotron confirms it works after we ship Stable. Thank you both for helping out.

@Bebotron
Copy link

Will keep and eye out and update! Thanks!

@rebornix rebornix modified the milestones: September 2021, On Deck Sep 29, 2021
@tanhakabir
Copy link
Contributor

Closing this issue since it seems fixed!

@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster notebook notebook-layout
Projects
None yet
Development

No branches or pull requests

8 participants
@pbotros @rebornix @tanhakabir @Bebotron @rohitsathish @WLDCH @kevinsu1015 and others