Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 399370

Summary: Arrow Keys behavior differs between SWT/RWT for Radio Buttons (SWT.RADIO)
Product: [RT] RAP Reporter: Sebastien Arod <sebastien.arod>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1 M1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
A snippet project showing the problems
none
Workaround replacing the default arrow behavior none

Description Sebastien Arod CLA 2013-01-29 05:43:25 EST
Created attachment 226247 [details]
A snippet project showing the problems

Arrow Keys with radio buttons behave differently in RWT and SWT.

1. First discrepancy:
In SWT using arrow keys change the focus but not the selection of buttons
In RWT the arrow keys change both focus and selection state

2. Second discrepancy:
In SWT using arrow keys skip the disabled buttons. In RWT disabled buttons can still be selected.

I attach a snippet project to reproduce the problems
Comment 1 Sebastien Arod CLA 2013-01-29 05:45:05 EST
I reproduced the issue with RAP 1.5.1 and RAP 2.0 RC1
On Firefox 18.0.1 and Chromium Version 23.0.1271.97 Ubuntu 12.04
Comment 2 Sebastien Arod CLA 2013-01-29 10:40:20 EST
Created attachment 226264 [details]
Workaround replacing the default arrow behavior

Here is sample of code to workaround this issue and have a behavior similar to SWT
Comment 3 Ivan Furnadjiev CLA 2013-02-11 08:20:11 EST
At least in SWT on Windows, arrow keys change both focus and selection. That's why I think that the RWT behavior is correct. I agree with the second issue - disabled button get selected with arrow keys. Disabled buttons should be skipped instead.
Comment 4 Ivan Furnadjiev CLA 2013-02-11 10:23:55 EST
Fixed in master with commit ded3bbdf66248f07bb5264e76c550993afd92cea.