-
Notifications
You must be signed in to change notification settings - Fork 253
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
Keep focus on "Hide" while ModalOverlay is visible #795
base: master
Are you sure you want to change the base?
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
To reproduce the issue (tested on Mac & KDE):
|
Why does the issue happen only on certain platforms? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... keeping the focus on the "Hide" button while the ModalOverlay is visible.
That looks like a better commit message / PR description.
e6418e6
to
1b34e0d
Compare
Not sure about other platforms. I had a mac and a KDE machine and happened on both of them. Have not checked on other platforms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can actually see two distinct issues here:
-
The "Hide" button doesn't have focus when the overlay shows for the first time. This can be resolved with
ui->closeButton->setFocus();
in theModalOverlay
constructor. -
The other issue is a bit convoluted. As a child widget, the overlay also follows its parent's tab order when processing "Tab" or "Shift+Tab" keys. Isolating the overlay's tab order might also be a solution to the issue.
This PR indeed forces focus on the "Hide" button as long as the overlay is visible. This approach is acceptable as the "Hide" button is the only one in the overlay.
Concept and approach ACK 1b34e0d. Also tested on Ubuntu 22.04.
During the initial sync, the Tab moves the focus to the widgets of the main window, even when the ModalOverlay is visible. This creates some weird rectangular *selections on the screen*. This PR fixes this by keeping the focus on the "Hide" button while the ModalOverlay is visible. Fixes bitcoin-core#783
1b34e0d
to
992b1bb
Compare
Thanks for the ACK. Algo agree with your point on better readability of |
Wouldn't it be better to hide the covered widgets instead? |
Are you still working on this? If so, do you mind addressing #795 (comment)? |
sorry I have missed that comment. Will check it and come back to you soon. |
Thanks for the suggestion @luke-jr . This is the path I tried first but moved to the current solution because of two issues:
Because of these two, I chose the method I implemented but I will be more than happy to hear your comments and update the PR accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept & approach ACK 992b1bb
Tested this PR on Ubuntu 22.04 with GNOME
desktop, not seen any issues with it but I couldn't reproduce the original issue, perhaps it depends on the platform or it's KDE
's specific (?).
I agree with the reasoning on the author's taken approach, unless there's another problem that @luke-jr still sees with it.
Please do not hesitate to ask me if any other update is needed on this from my side. Thanks. |
During the initial sync, the Tab moves the focus to the widgets of the main window, even when the ModalOverlay is visible. This creates some weird rectangular selections on the screen.
This PR fixes this by keeping the focus on the "Hide" button while the ModalOverlay is visible.
Fixes #783