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

mo.mpl.interactive() should not change focus when plot is rendered #1946

Open
ggggggggg opened this issue Aug 2, 2024 · 1 comment
Open

Comments

@ggggggggg
Copy link
Contributor

Description

I've been working with multiple notebooks making extensive use of mo.mpl.interactive() for the the past few weeks. My workflow has been to develop code in the notebook, then refactor that code into a package, and rely on autoloading to re-run the notebook. I'm finding that the behavior of moving focus to a plot when it is rendered is quite annoying. It steals focus from the cell I'm typing in, so i just have to wait a fairly long time for all plots to render, then scroll back to find out where I was, then start typing again.

Suggested solution

The notebook should NOT shift focus to a plot when it is rendered, specifically for mo.mpl.interactive() since that is what I use. I don't know how other plots and UI elements behave, but I highly suspect they also should no shift focus when rendered (which may already be the case, I just don't know).

Alternative

Add an optional argument to disable focus shift like mo.mpl.interactive(focus_on_render=False) or a notebook wide setting like mo.mpl.set_global(focus_on_render=False).

Additional context

No response

@ggggggggg ggggggggg changed the title mo.mpl.interactive() do not change focus when plot is rendered mo.mpl.interactive() should not change focus when plot is rendered Aug 2, 2024
@anjiro
Copy link

anjiro commented Jan 8, 2025

I'm running into this too—especially when using cmd-enter to execute code but stay in a cell, I expect to be able to start typing again almost immediately, but instead I have to use the mouse to get focus back onto the cell again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants