title: ExtJS6 Launch Modal Window fron ViewController
body: <p>I am attempting to launch a modal window from within a viewcontroller.  Consider the following  code (also located at <a href="https://fiddle.sencha.com/#fiddle/1335" rel="nofollow">https://fiddle.sencha.com/#fiddle/1335</a>):</p>
  
  <pre><code>Ext.application({
      name : 'Fiddle',
      launch : function() {
          Ext.define('Window1',{
              extend: 'Ext.window.Window',
              controller: 'winctrl',
              xtype: 'window1',
              initComponent: function(){
                  Ext.apply(this,{
                      title:'Window 1',
                      width: 400,
                      height: 400,
                      layout: {type:'hbox',pack:'center',align:'middle'},
                      items:[{
                          xtype: 'button',
                          text: 'Click Me!',
                          handler: 'btnClickMeClick'
                      }]
                  });
                  this.callParent(arguments);
              }
          });
          Ext.define('Window2',{
              extend: 'Ext.window.Window',
              xtype: 'window2',
              initComponent: function(){
                  Ext.apply(this,{
                      title: 'Window 2',
                      width: 200,
                      height: 200,
                      modal: true,
                      //renderTo: Ext.getBody(),
                      layout: {type:'hbox',pack:'center',align:'middle'},
                      items:[{
                          html: 'Modal Looks Odd',
                          listeners:{
                              afterrender: 'htmlRender'   
                          }
                      }]
                  });
                  this.callParent(arguments);
              }
          });
          Ext.define('WinCtrl',{
              extend: 'Ext.app.ViewController',
              alias:'controller.winctrl',
              btnClickMeClick: function(){
                  this.dialog = this.getView().add({xtype:'window2'});
                  this.dialog.show();
              },
              htmlRender: function(){
                  console.log(this.dialog);
              }
          });
          Ext.widget('window1').show();
      }
  }); 
  </code></pre>
  
  <p>The problem I am running into is that when window 2 is launched it is modal only to the view that launched it and I need the window to be modal to the entire document. If run as is, the htmlRender function will log the window 2 object correctly. I attempted to set the <code>renderTo: Ext.getBody()</code> on window 2; however, I am unable to access it's object when it is rendered.  In this case, htmlRender logs an "undefined" for the window 2 object. </p>
  
  <p>I need some help allowing window 2 to be rendered as a modal to the document while allowing me to reference its object.  Thanks for any help. </p>