Vscode-jupyter: Weird focus issue with notebooks

Created on 19 Feb 2020  路  12Comments  路  Source: microsoft/vscode-jupyter

Branch - master

  • Open an nb with cells
  • Change tabs (e.g. open another file non-ipynb)
  • Go back to nb
  • Watch how all cells have focus
  • Also notice how it scrolls to the very bottom

focusIssue

All 12 comments

Seems to be syncing stuff

This is caused by the following code:
activateCount: arg.prevState.activateCount + 1

Based on the comments this applies to interactive window, I propose we remove this from native editor (i.e. leave it as zero, also makes it easier as there's only one way focus change change) as it doesn't seem to do anything in Native Editor in the master branch nor release branch.

Previously we had some code that set focus in a number of places, based on @IanMatthewHuff review I modified the selection and focus, I guess this is the last place where it happens.

@IanMatthewHuff @rchiodo @DavidKutu /cc

That is for the interactive window to force it to have focus. Should be ignorable on the notebook editor

I'll merge this into master as well. I know @IanMatthewHuff has come across this issue in the past.

The main use for this was actually from @DavidKutu fixing Ctrl+1 and Ctrl+2 setting focus to the window. After this change we would just need to verify that ctrl+X correctly puts focus somewhere in the native editor.

@DonJayamanne Does your commit resolve only the focus issue or also scrolling? I still see the scrolling issue. 2020.02.63990. thanks!

Please could you create a new issue for that.
I didn't know about scrolling, the issue only addresses focus issue.

Is that not what you're seeing in your animation up top? That when you switch to the nb it scrolls to the bottom? Maybe I misunderstood.

Oh yes, it does scroll, but I only focused on & noticed the focus issue.
I don't think the scrolling issue exists anymore, else I would have noticed that after fixing this issue
Please feel free to test this out using our insiders version Python: Switch to Insiders Daily/Weekly Channel

Just installed the insider's version, and you are correct, no scrolling issue! Thank you for your hard work :)

@bpops Thanks for testing and confirming the fix.

Closing as this has been validated by a user.

Was this page helpful?
0 / 5 - 0 ratings