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

Widgets with a flashing cursor should turn them off when not on current screen #3405

Open
davep opened this issue Sep 26, 2023 · 2 comments
Open
Labels
enhancement New feature or request Task

Comments

@davep
Copy link
Contributor

davep commented Sep 26, 2023

Using this code:

from textual.app import App, ComposeResult
from textual.widgets import Input

class DoubleCursorApp(App[None]):

    def compose(self) -> ComposeResult:
        yield Input()

if __name__ == "__main__":
    DoubleCursorApp().run()

if you pull up the command palette you end up with two flashing cursors:

Screen.Recording.2023-09-26.at.11.41.36.mov

We should probably have Input (and likely TextArea) not show the visible state of the cursor if the app's current screen isn't the widget's screen.

@davep davep added enhancement New feature or request Task labels Sep 26, 2023
@willmcgugan
Copy link
Collaborator

I wonder if we should effectively blur everything on the non-active screen.

Alternatively, maybe a timer could have a "pause if not in active screen" setting.

@davep
Copy link
Contributor Author

davep commented Sep 26, 2023

I wonder if we should effectively blur everything on the non-active screen.

That would potentially be an issue for the command palette as knowing the focused widget below is helpful; also I feel that dimmed focused state makes sense for the background widget. I think pausing the timer does make more sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Task
Projects
None yet
Development

No branches or pull requests

2 participants