Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 361098
Collapse All | Expand All

(-)js/org/eclipse/rwt/widgets/Tree.js (-1 / +1 lines)
Lines 904-910 Link Here
904
    // focus & selection
904
    // focus & selection
905
905
906
    _singleSelectItem : function( event, item ) {
906
    _singleSelectItem : function( event, item ) {
907
      if( event instanceof qx.event.type.KeyEvent && event.isCtrlPressed() ) {
907
      if( event.isCtrlPressed() && this.isItemSelected( item ) ) {
908
        // NOTE: Apparently in SWT this is only supported by Table, not Tree.
908
        // NOTE: Apparently in SWT this is only supported by Table, not Tree.
909
        //       No reason not to support it in RAP though.
909
        //       No reason not to support it in RAP though.
910
        this._ctrlSelectItem( item );
910
        this._ctrlSelectItem( item );
(-)js/org/eclipse/rwt/test/tests/TreeTest.js (-2 / +18 lines)
Lines 1006-1012 Link Here
1006
      assertFalse( tree.isItemSelected( item1 ) );
1006
      assertFalse( tree.isItemSelected( item1 ) );
1007
      assertFalse( tree.isItemSelected( item2 ) );
1007
      assertFalse( tree.isItemSelected( item2 ) );
1008
      tree.destroy();
1008
      tree.destroy();
1009
    },    
1009
    },
1010
1010
1011
    testShiftMultiSelection : function() {
1011
    testShiftMultiSelection : function() {
1012
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
1012
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
Lines 2564-2570 Link Here
2564
      assertFalse( tree.isItemSelected( item2 ) );
2564
      assertFalse( tree.isItemSelected( item2 ) );
2565
      tree.destroy();
2565
      tree.destroy();
2566
    },
2566
    },
2567
    
2567
2568
    testKeyboardNavigationCtrlUpDown : function() {
2569
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
2570
      var tree = this._createDefaultTree();
2571
      tree.setItemCount( 3 );
2572
      var item0 = new org.eclipse.rwt.widgets.TreeItem( tree.getRootItem(), 0 );
2573
      var item1 = new org.eclipse.rwt.widgets.TreeItem( tree.getRootItem(), 1 );
2574
      var item2 = new org.eclipse.rwt.widgets.TreeItem( tree.getRootItem(), 2 );
2575
      testUtil.flush();
2576
      testUtil.click( tree._rowContainer._children[ 0 ] );
2577
      testUtil.pressOnce( tree, "Down", qx.event.type.DomEvent.CTRL_MASK );
2578
      assertFalse( tree.isItemSelected( item0 ) );
2579
      assertTrue( tree.isItemSelected( item1 ) );
2580
      assertFalse( tree.isItemSelected( item2 ) );
2581
      tree.destroy();
2582
    },
2583
2568
    testKeyboardNavigationRight : function() {
2584
    testKeyboardNavigationRight : function() {
2569
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
2585
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
2570
      var tree = this._createDefaultTree();
2586
      var tree = this._createDefaultTree();

Return to bug 361098