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

v2: Keyboard navigation on MessageBox no longer working #3655

Closed
fergusonr opened this issue Aug 9, 2024 · 3 comments · Fixed by #3656
Closed

v2: Keyboard navigation on MessageBox no longer working #3655

fergusonr opened this issue Aug 9, 2024 · 3 comments · Fixed by #3656
Assignees
Labels
Milestone

Comments

@fergusonr
Copy link
Contributor

2.0.0-v2-develop.2164
Keyboard navigation of messageBox buttons no longer works. Left/right arrows do not navigate buttons

Reproduce

MessageBox.Query(50, 7, "Quit?", "Are you sure you want to quit?", 0, "Yes", "No");

Expected behavior
messageBox

@tig tig self-assigned this Aug 10, 2024
@tig tig added the bug label Aug 10, 2024
@tig tig added this to the V2 Beta milestone Aug 10, 2024
@tig
Copy link
Collaborator

tig commented Aug 10, 2024

On it. Thanks!

@tig
Copy link
Collaborator

tig commented Aug 10, 2024

Actually, the problem is not navigation, but drawing.

I changed how MessageBox worked. Previously the text was rendered by a subview. This was a legacy from early v1 where View.Text didn't exist. I removed this subview and made it so the MessageBox text was just Dialog.Text. However, because the "Dialog" ColorScheme inverts Normal/Focus, this caused the Text to be drawn inverted from what you'd expect.

To fix THIS, I mistakenly was setting Dialog.ColorScheme in MessageBox.cs.

The fix (temporary) is to override GetNormalColor/GetFocusColor in Dialog to always return Normal. PR incomming.

Long term, the fix needs to be in #2381

@fergusonr
Copy link
Contributor Author

All good now. thankyou!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants