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

Bug 343557

Summary: [Button] It's possible to select disabled checkbox under some constellations
Product: [RT] RAP Reporter: Ivan Furnadjiev <ivan>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 1.4   
Target Milestone: 1.4 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Proposed patch none

Description Ivan Furnadjiev CLA 2011-04-21 10:35:57 EDT
Steps to reproduce with Controls Demo:
1. Disable preselectFirstItemButton checkbox in ComboTab.java - add preselectFirstItemButton.setEnabled( false ); at line 83
2. Start Controls Demo - Combo Tab
3. Open "Filled Combo" - make combo list visible
4. Click on the disabled checkbox with combo list still visible
5. Disabled checkbox is now selected !!! :-)
6. Open combo list again
7. Click on the disabled checkbox
8. Disabled checkbox is now deselected !!! :-)
Comment 1 Ivan Furnadjiev CLA 2011-04-21 11:16:10 EDT
Actually, this issue is not limited to the checkboxes. All buttons are affected - check, radio, toggle, push. Reproducible with Controls Demo -> Button tab by using cursor combo.
Comment 2 Ivan Furnadjiev CLA 2011-04-26 04:33:52 EDT
After some debugging I found that the issue is introduced by the fix for bug 332436 - introduced Combo.js#_reDispatch. In case of dropped list the captured event is redispatched to its original target. I don't remember why this _reDispatch is introduced, but removing it, does not break any JS test and fixes both this bug and bug 343532.
Comment 3 Ivan Furnadjiev CLA 2011-04-26 08:35:27 EDT
Created attachment 194047 [details]
Proposed patch

This patch changes the Combo.js#_reDispatch to redispatch the captured event only if the original target parent is the combo list (target is ListItem) or the list vertical scrollbar (target is scrollbar buttons). This patch fixes this bug, bug 342532 (without issue in comment #2) and the issue mentioned in bug 343800 comment #1. JS tests added. Tim, please review.
Comment 4 Ivan Furnadjiev CLA 2011-04-26 09:32:55 EDT
Applied patch to CVS HEAD.