You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
matplotlib %notebook steals focus in jupyter notebooks #4758
On matplotlib master, executing a cell that displays a plot steals focus from the jupyter notebook with the %matplotlib notebook magic enabled. By 'steals focus' I mean that the only key combination that will interact with the notebook is shift+enter, which @tacaswell tells me is because matplotlib special cases that one. I'm conflicted by this behavior, as, I can see compelling arguments for both stealing keyboard focus and NOT stealing keyboard focus. I personally like using the notebook keyboard shortcuts (up arrow to move up, down arrow to move down, 00 to restart the kernel, etc...), so this is very disruptive behaviour to my work flow. I would be happy with a new keyboard shortcut in the matplotlib notebook front-end that returns focus to the notebook.
@tacaswell so shift+enter actually does exactly what I suggested above. I thought that, once the mpl widget stole the focus that shift+enter was executing the next cell. In actuality, it is returning focus to the notebook and moving to the next cell, but not executing it. My apologies for the noise.
Activity
ericdill commentedon Jul 23, 2015
@tacaswell so
shift+enteractually does exactly what I suggested above. I thought that, once the mpl widget stole the focus thatshift+enterwas executing the next cell. In actuality, it is returning focus to the notebook and moving to the next cell, but not executing it. My apologies for the noise.Fix shift-enter behvaior in nbagg backend