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

Screen.dismiss should error if not the top-most screen #2575

Closed
willmcgugan opened this issue May 16, 2023 · 1 comment · Fixed by #2580
Closed

Screen.dismiss should error if not the top-most screen #2575

willmcgugan opened this issue May 16, 2023 · 1 comment · Fixed by #2580
Assignees
Labels
enhancement New feature or request Task

Comments

@willmcgugan
Copy link
Collaborator

At the moment if you call dismiss on a screen that is not the top-most on the stack, strange things will happen.

I think the only solution here is for that to be an error.

i.e. if I push screens A, B, C on to the stack. Then I call B.dismiss() that should raise a DismissError (name TBD). Only C.dismiss() is valid, because it is a the top of the stack.

@github-actions
Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

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

Successfully merging a pull request may close this issue.

2 participants