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 346059
Collapse All | Expand All

(-)js/org/eclipse/swt/widgets/Combo.js (-9 / +4 lines)
Lines 75-88 Link Here
75
    // Init events
75
    // Init events
76
    this.addEventListener( "appear", this._onAppear, this );
76
    this.addEventListener( "appear", this._onAppear, this );
77
    this.addEventListener( "focusin", this._onFocusIn, this );
77
    this.addEventListener( "focusin", this._onFocusIn, this );
78
    this.addEventListener( "blur", this._onBlur, this );
78
    this.addEventListener( "changeWidth", this._onChangeSize, this );
79
    this.addEventListener( "changeWidth", this._onChangeSize, this );
79
    this.addEventListener( "changeHeight", this._onChangeSize, this );
80
    this.addEventListener( "changeHeight", this._onChangeSize, this );
80
    this.addEventListener( "contextmenu", this._onContextMenu, this );
81
    this.addEventListener( "contextmenu", this._onContextMenu, this );
81
    this.addEventListener( "changeFont", this._onChangeFont, this );
82
    this.addEventListener( "changeFont", this._onChangeFont, this );
82
    this.addEventListener( "changeTextColor", this._onChangeTextColor, this );
83
    this.addEventListener( "changeTextColor", this._onChangeTextColor, this );
83
    this.addEventListener( "changeBackgroundColor",
84
    this.addEventListener( "changeBackgroundColor", this._onChangeBackgroundColor, this );
84
                           this._onChangeBackgroundColor, 
85
                           this );
86
    this.addEventListener( "changeVisibility", this._onChangeVisibility, this );
85
    this.addEventListener( "changeVisibility", this._onChangeVisibility, this );
87
    // Mouse events
86
    // Mouse events
88
    this.addEventListener( "mousedown", this._onMouseDown, this );
87
    this.addEventListener( "mousedown", this._onMouseDown, this );
Lines 111-119 Link Here
111
    this.removeEventListener( "contextmenu", this._onContextMenu, this );
110
    this.removeEventListener( "contextmenu", this._onContextMenu, this );
112
    this.removeEventListener( "changeFont", this._onChangeFont, this );
111
    this.removeEventListener( "changeFont", this._onChangeFont, this );
113
    this.removeEventListener( "changeTextColor", this._onChangeTextColor, this );
112
    this.removeEventListener( "changeTextColor", this._onChangeTextColor, this );
114
    this.removeEventListener( "changeBackgroundColor",
113
    this.removeEventListener( "changeBackgroundColor", this._onChangeBackgroundColor, this );
115
                              this._onChangeBackgroundColor, 
116
                              this );
117
    this.removeEventListener( "changeVisibility", this._onChangeVisibility, this );
114
    this.removeEventListener( "changeVisibility", this._onChangeVisibility, this );
118
    this.removeEventListener( "mousedown", this._onMouseDown, this );
115
    this.removeEventListener( "mousedown", this._onMouseDown, this );
119
    this.removeEventListener( "mouseup", this._onMouseUp, this );
116
    this.removeEventListener( "mouseup", this._onMouseUp, this );
Lines 562-570 Link Here
562
          }
559
          }
563
          break;
560
          break;
564
      }
561
      }
565
      if(    this._field.isCreated()
562
      if( this._field.isCreated() && !org.eclipse.swt.EventUtil.getSuspended() ) {
566
          && !org.eclipse.swt.EventUtil.getSuspended() ) 
567
      {
568
        this._handleSelectionChange();
563
        this._handleSelectionChange();
569
      }
564
      }
570
    },
565
    },
(-)js/org/eclipse/rwt/test/tests/ComboTest.js (+13 lines)
Lines 34-39 Link Here
34
      combo.destroy();
34
      combo.destroy();
35
    },
35
    },
36
36
37
    testCloseListOnBlur : function() {
38
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
39
      var combo = this._createDefaultCombo();
40
      combo.focus();
41
      combo.setListVisible( true );
42
      testUtil.flush();
43
      assertTrue( combo._list.isSeeable() );
44
      combo.blur();
45
      testUtil.flush();
46
      assertFalse( combo._list.isSeeable() );
47
      combo.destroy();
48
    },
49
37
    testItems : function() {
50
    testItems : function() {
38
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
51
      var testUtil = org.eclipse.rwt.test.fixture.TestUtil;
39
      var combo = this._createDefaultCombo();
52
      var combo = this._createDefaultCombo();

Return to bug 346059