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

(-)js/rwt/widgets/util/MnemonicHandler.js (+3 lines)
Lines 117-122 Link Here
117
          if( !onlyVisible || entry[ 0 ].isSeeable() ) {
117
          if( !onlyVisible || entry[ 0 ].isSeeable() ) {
118
            try{
118
            try{
119
              entry[ 1 ].call( entry[ 0 ], event );
119
              entry[ 1 ].call( entry[ 0 ], event );
120
              if( event.success ) {
121
                break;
122
              }
120
            } catch( ex ) {
123
            } catch( ex ) {
121
              var msg = "Could not handle mnemonic " + event.type + ". ";
124
              var msg = "Could not handle mnemonic " + event.type + ". ";
122
              if( entry[ 0 ].isDisposed() ) {
125
              if( entry[ 0 ].isDisposed() ) {
(-)js/org/eclipse/rwt/test/tests/MnemonicHandlerTest.js (+21 lines)
Lines 230-235 Link Here
230
230
231
      TestUtil.keyDown( widget, "B", DomEvent.CTRL_MASK );
231
      TestUtil.keyDown( widget, "B", DomEvent.CTRL_MASK );
232
      assertEquals( 0, TestUtil.getRequestsSend() );
232
      assertEquals( 0, TestUtil.getRequestsSend() );
233
    },
234
235
    testFireTrigger_successStopsTriggerEvent : function() {
236
      handler.setActivator( "CTRL" );
237
      success = true;
238
      widget.focus();
239
      var widgetTwo = TestUtil.createWidgetByProtocol( "w4", "w2" );
240
      TestUtil.flush();
241
      var secondLog = [];
242
      handler.add( widgetTwo, function( event ) {
243
        if( event.type === "trigger" ) {
244
          secondLog.push( event );
245
          event.success = true;
246
        }
247
      } );
248
249
      TestUtil.keyDown( shell, "Control", DomEvent.CTRL_MASK );
250
      TestUtil.keyDown( widget, "B", DomEvent.CTRL_MASK );
251
252
      var totalSuccess = charLog.length + secondLog.length;
253
      assertEquals( 1, totalSuccess );
233
    }
254
    }
234
255
235
  }
256
  }

Return to bug 413174