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

(-)js/org/eclipse/swt/widgets/Shell.js (-6 / +16 lines)
Lines 20-30 Link Here
20
    //      is a 'protected' field on class Window
20
    //      is a 'protected' field on class Window
21
    this._captionTitle.setMode( "html" );
21
    this._captionTitle.setMode( "html" );
22
    this._activeControl = null;
22
    this._activeControl = null;
23
    this._focusControl = null;
23
    this._activateListenerWidgets = new Array();
24
    this._activateListenerWidgets = new Array();
24
    this._parentShell = null;
25
    this._parentShell = null;
25
    this._renderZIndex = true;
26
    this._renderZIndex = true;
26
    // TODO [rh] check whether these listeners must be removed upon disposal
27
    // TODO [rh] check whether these listeners must be removed upon disposal
27
    this.addEventListener( "changeActiveChild", this._onChangeActiveChild );
28
    this.addEventListener( "changeActiveChild", this._onChangeActiveChild );
29
    this.addEventListener( "changeFocusedChild", this._onChangeFocusedChild );
28
    this.addEventListener( "changeActive", this._onChangeActive );
30
    this.addEventListener( "changeActive", this._onChangeActive );
29
    this.addEventListener( "changeMode", this._onChangeMode );
31
    this.addEventListener( "changeMode", this._onChangeMode );
30
    this.addEventListener( "changeLeft", this._onChangeLocation );
32
    this.addEventListener( "changeLeft", this._onChangeLocation );
Lines 150-155 Link Here
150
  destruct : function() {
152
  destruct : function() {
151
    this.setParentShell( null );
153
    this.setParentShell( null );
152
    this.removeEventListener( "changeActiveChild", this._onChangeActiveChild );
154
    this.removeEventListener( "changeActiveChild", this._onChangeActiveChild );
155
    this.removeEventListener( "changeFocusedChild", this._onChangeFocusedChild );
153
    this.removeEventListener( "changeActive", this._onChangeActive );
156
    this.removeEventListener( "changeActive", this._onChangeActive );
154
    this.removeEventListener( "changeMode", this._onChangeMode );
157
    this.removeEventListener( "changeMode", this._onChangeMode );
155
    this.removeEventListener( "changeLeft", this._onChangeLocation );
158
    this.removeEventListener( "changeLeft", this._onChangeLocation );
Lines 365-370 Link Here
365
        }
368
        }
366
      }
369
      }
367
    },
370
    },
371
    
372
    _onChangeFocusedChild : function( evt ) {
373
      if( org_eclipse_rap_rwt_EventUtil_suspend ) {
374
        this._focusControl = this.getFocusedChild();
375
      }
376
    },
368
377
369
    _onChangeActive : function( evt ) {
378
    _onChangeActive : function( evt ) {
370
      // TODO [rst] This hack is a workaround for bug 345 in qooxdoo, remove this
379
      // TODO [rst] This hack is a workaround for bug 345 in qooxdoo, remove this
Lines 450-462 Link Here
450
459
451
    _onSend : function( evt ) {
460
    _onSend : function( evt ) {
452
      if( this.getActive() ) {
461
      if( this.getActive() ) {
453
        var widgetManager = org.eclipse.swt.WidgetManager.getInstance();
462
        var focusedChild = this.getFocusedChild();
454
        var focusedChildId = null;
463
        if( focusedChild != null && focusedChild != this._focusControl ) {
455
        if( this.getFocusedChild() != null ) {
464
          this._focusControl = focusedChild;
456
          focusedChildId = widgetManager.findIdByWidget( this.getFocusedChild() );
465
          var widgetManager = org.eclipse.swt.WidgetManager.getInstance();
466
          var focusedChildId = widgetManager.findIdByWidget( focusedChild );
467
          var req = org.eclipse.swt.Request.getInstance();
468
          req.addParameter( req.getUIRootId() + ".focusControl", focusedChildId );    
457
        }
469
        }
458
        var req = org.eclipse.swt.Request.getInstance();
459
        req.addParameter( req.getUIRootId() + ".focusControl", focusedChildId );
460
      }
470
      }
461
    },
471
    },
462
472

Return to bug 310767