Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343557 - [Button] It's possible to select disabled checkbox under some constellations
Summary: [Button] It's possible to select disabled checkbox under some constellations
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 1.4 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-21 10:35 EDT by Ivan Furnadjiev CLA
Modified: 2011-04-26 09:32 EDT (History)
0 users

See Also:


Attachments
Proposed patch (4.04 KB, patch)
2011-04-26 08:35 EDT, Ivan Furnadjiev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.