-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Use auto focus on the first input field on all screens #1311
Use auto focus on the first input field on all screens #1311
Conversation
fillForm(newValue.getAddressString()); | ||
UserThread.execute(() -> amountTextField.requestFocus()); |
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.
Although UserThread.execute
is short I think it's hiding the meaning.
What do you think about creating method in GUIUtil
called executeOnNextRenderFrame
?
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.
Hm... Maybe better if we rename "execute". But that is used in many places so I would prefer to do that myself to check all and have an atomic commit with only that refactoring.
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 think it's fine to have an additional method in proper place (GUIUtil) that simply delegates to UserThread if that method's name tells us what's the purpose. Just in case impl changes later.
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.
Ok. We should use that only then for the render in next frame use case as that is GUI specific. The UserThread.execute is GUI agnostic and works for headless versions as well.
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.
Actually I am not sure if the UserThread.execute is needed at all cases. Can you test the different views if it works without the UserThread.execute as well? I will wait for merging the PR until that is resolved.
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.
Question
14f08a6
to
53a7ff9
Compare
I've tried all screens with and without execute and it was needed.
1 lut 2018 21:59 "Manfred Karrer" <notifications@github.com> napisał(a):
… ***@***.**** commented on this pull request.
------------------------------
In gui/src/main/java/io/bisq/gui/main/funds/deposit/DepositView.java
<#1311 (comment)>
:
> fillForm(newValue.getAddressString());
+ UserThread.execute(() -> amountTextField.requestFocus());
Actually I am not sure if the UserThread.execute is needed at all cases.
Can you test the different views if it works without the UserThread.execute
as well? I will wait for merging the PR until that is resolved.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1311 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAaT2OscSjxrwT4BDW90WLziAMj1rSv5ks5tQiWTgaJpZM4R1NNW>
.
|
Ok, then I would suggest to use GUIUtil.requestFocus(Node node). |
53a7ff9
to
f0a985e
Compare
Introduced GUIUtil.requestFocus. |
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.
Seems all ok to me.
This commit reverts a change added in f0a985e (#1311) that made it impossible to scroll through arbitration tickets with the arrow keys, because on selecting each dispute/ticket, the input text area would steal focus away. Now, the input text field still gets auto-focused when the dispute view is opened, but does not try to steal / auto-focus when scrolling through / selecting individual disputes.
@blabno, @ManfredKarrer, there was a minor bug introduced with these changes. I've just fixed it in 8d44f75. |
Fixes #1208