| Summary: | Missing focusLost when keyboard-triggering default button | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Marco Missfeldt <marco.missfeldt> | ||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | 2.0 | ||||||
| Target Milestone: | 2.1 M1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
I learned from Tom that on SWT-Mac the focus can't move to buttons. Still I think RAP should transfer the focus on ENTER, because in RAP the buttons *are* focussable and it is also transfered if using a mouse click. Then this would be exactly the same behaviour as in SWT-Win32 (where buttons also are focussable). Fixed with commit f815522e7e76dbfcf5764af7c552cfa3f478eb34. Now the default button gain the focus when it's triggered by keyboard. |
Created attachment 223998 [details] workaround for the missing default-button transfer I use RAP version 2.0.0-M3-20121112-1148. 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. A possible workaround that works for me is added as a code snippet in the attachment: If I check and transfer the focus in my Button-Listener, I am able to get the behaviour which is the standard in SWT.