Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361098 - [Table][Tree] Multi selection possible on non multi table/tree
Summary: [Table][Tree] Multi selection possible on non multi table/tree
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.5 M3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-17 03:59 EDT by Ivan Furnadjiev CLA
Modified: 2011-10-17 07:29 EDT (History)
0 users

See Also:


Attachments
Patch that solves the problem (2.62 KB, patch)
2011-10-17 07:22 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-10-17 03:59:05 EDT
Reproducible with Controls Demo -> Table Tab:
1. Navigate to Controls Demo -> Table Tab
2. Select an item
3. Use CTRL+Arrow Up/Down to select multiple items on a SINGLE selection Table :-)
Comment 1 Ivan Furnadjiev CLA 2011-10-17 05:56:24 EDT
JavaScript test case:
    testKeyboardNavigationCtrlUpDown : function() {
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
      var tree = this._createDefaultTree();
      tree.setItemCount( 3 );
      var item0 = new org.eclipse.rwt.widgets.TreeItem( tree.getRootItem(), 0 );
      var item1 = new org.eclipse.rwt.widgets.TreeItem( tree.getRootItem(), 1 );
      var item2 = new org.eclipse.rwt.widgets.TreeItem( tree.getRootItem(), 2 );
      testUtil.flush();
      testUtil.click( tree._rowContainer._children[ 0 ] );
      testUtil.pressOnce( tree, "Down", qx.event.type.DomEvent.CTRL_MASK );
      assertFalse( tree.isItemSelected( item0 ) );
      assertTrue( tree.isItemSelected( item1 ) );
      assertFalse( tree.isItemSelected( item2 ) );
      tree.destroy();
    },
Comment 2 Ivan Furnadjiev CLA 2011-10-17 07:22:32 EDT
Created attachment 205308 [details]
Patch that solves the problem
Comment 3 Ivan Furnadjiev CLA 2011-10-17 07:29:59 EDT
Applied patch to CVS HEAD. Changed Tree.js#_singleSelectItem to not select unselected item with CTRL.