REQUIRED INFORMATION


Ext version tested:
  • Ext 4.0.5


Browser versions tested against:
  • FF3.6.21 (firebug 1.7.3)


Description:
  • Ext.window.Window adds additional close tool on each use.
    Ext.window.Window does not close on key ESC (seems to be source issue).


Steps to reproduce the problem:
  • Create a view from Ext.window.Window that works as expected
    Add a tool to it
    Create a window
    Close it
    Create a window again, it will now have two close tools
    Close and create again, now three close tools, 4, 5, etc
    Ext.window.Window will not close using ESC key



The result that was expected:
  • New windows should only have a single close tool

    Window should close when has focus and ESC key is pressed.


The result that occurs instead:
  • Multiple close tools on window header.

    Doesn't close on ESC key


Test Case:

Code:
Ext.define('DevApp.view.wiki.View',{
	extend:'Ext.window.Window',
	alias: 'widget.wikiview',
	title: 'Edit Data',
	autoShow: true,
	tools: [{type:"gear", tooltip:"Edit", action:"edit"}],
	modal: true,
	height: 300,
	width: 300,     
	layout: 'fit',
	closable: true,
	initComponent: function(config) {
		this.items = [
            {
                xtype: 'panel',                           
                data: this.data,                
                tpl: '<h1>{subject}</h1>{body}'                
            }
        ];        
        this.callParent(arguments);
    }
});


HELPFUL INFORMATION


Screenshot or Video:
  • attached


See this URL for live test case: http://


Debugging already done:
  • none


Possible fix:
  • From 63720 of ext-all-debug.js.

    keyMap is disabled.

    Code:
     if (me.closable) {
                keyMap = me.getKeyMap();
                keyMap.on(27, me.onEsc, me);
    
                
                    keyMap.disable();
                
            }


Additional CSS used:
  • only default ext-all.css
  • custom css (include details)


Operating System:
  • ________
  • Win 7