Missing focusLost when keyboard-triggering default button [message #987400] |
Mon, 26 November 2012 08:32  |
Eclipse User |
|
|
|
I have a view with some controls and a default button, set by setDefaultButton(Button).
In SWT, when I press ENTER to trigger the default button, the focus changes to the default button before it is triggered. In RWT the focus doesn't change.
This only affects keyboard triggering. When I use the mouse to trigger the default button, the focus change occurs.
This is a big issue for us because we use the focus lost events on text controls to perceive content changes as a whole (and not on every single key press).
So the effect in RWT for example is when I enter a password and directly hit ENTER to trigger the Login-Button, the password input is not recognized because of the missing focus change. When I use the mouse instead everything is fine.
I wonder if nobody else has problems with this or am I missing an important point?
|
|
|
|
|
|
|
Re: Missing focusLost when keyboard-triggering default button [message #987634 is a reply to message #987400] |
Tue, 27 November 2012 06:35   |
Eclipse User |
|
|
|
Just to make sure.
Have you tested this behavior on all SWT platforms? On Mac normally a
button can never receive focus so if you rely on this your application
it is broken on Mac OS-X as well!
In the RAP case the behavior you see might be a bug, on OS-X it is
desired, bottom line do not use focus-out, or explicitly sync your model
from the UI before you execute actions attached to the SWT buttons.
Tom
Am 26.11.12 14:36, schrieb Marco Missfeldt:
> I have a view with some controls and a default button, set by
> setDefaultButton(Button).
>
> In SWT, when I press ENTER to trigger the default button, the focus
> changes to the default button before it is triggered. In RWT the focus
> doesn't change.
>
> This only affects keyboard triggering. When I use the mouse to trigger
> the default button, the focus change occurs.
>
> This is a big issue for us because we use the focus lost events on text
> controls to perceive content changes as a whole (and not on every single
> key press).
>
> So the effect in RWT for example is when I enter a password and directly
> hit ENTER to trigger the Login-Button, the password input is not
> recognized because of the missing focus change. When I use the mouse
> instead everything is fine.
>
> I wonder if nobody else has problems with this or am I missing an
> important point?
|
|
|
|
|
Re: Missing focusLost when keyboard-triggering default button [message #987793 is a reply to message #987674] |
Wed, 28 November 2012 03:27  |
Eclipse User |
|
|
|
Hi Thomas,
this delayed observable would be no solution for us, only new complexity. As you wrote correctly, this would not free us from explicitely syncing. And even worse: As many of our customers are no high-performance writers, still various intermediate results would be written into our models - leading to misleading attribute validations in the worst cases.
You're right that we would have a problem on Mac-SWT, but this is not a platform we plan to use. And if we must, we still have Swing as a proven alternative. We mainly support SWT because of RAP - as we looked for an AJAX-Platform that fits nicely into our architecture. Of course it's a great bargain that native SWT works too.
Now for the conclusion: I still think it's right to see this issue as a bug, because RAP is not Mac and in RAP the button is capable of getting the focus. So it should do, as is the case on other SWT platforms with focussable buttons like Windows.
Marco
|
|
|
Powered by
FUDForum. Page generated in 0.08818 seconds