Results 1 to 3 of 3

Thread: Ext.Window key ESC does not work after onclick

  1. #1
    Ext User
    Join Date
    Nov 2010

    Default Ext.Window key ESC does not work after onclick

    This code opens a modal window with an image of a graph inside. If you do not click on the window, you can use the Esc key to close the window. However, once you click on the modal window, it will no longer close using the Esc key. The code is below.

    var win = new Ext.Window({
                bodyStyle: 'background-color: white;',
                width: 800,
                height: 600,
                title: 'Signup Activity',
                closable: true,
                closeAction: 'close',
                modal: true,
                layout: 'fit',
                resizable: false,
                html: '<img id="popupImg" align="center" alt="Loading Public Signup Activity Chart" src="'
                    + pageConfig.ctx
                    + '/chart/publicSignupActivityLineChart.html?psDays=' + psDaysValue + '&width=786&height=568&_dt=' + dt,
                keys: [{
                        key: 27, // close on Esc
                        fn: function() {
                        stopEvent: true,
                        scope: win
    values for things like psDaysValue and others are populated just outside this method but they are there.

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007


    There has to be some element focused to receive the keystroke. If you blur the Window's hidden <a> element which functions as its focus holder, there's nothing active receiving keystrokes.

  3. #3
    Ext User
    Join Date
    Nov 2010


    So a click on the window that opens removes the focus from its <a> tag? Shouldn't it do just the opposite? I could see this being the case if I was clicking on the blurred portion of the window, but a click on the newly opened modal window will remove that focus?

Similar Threads

  1. Closing Window widget when ESC key is pressed
    By Umashanthi in forum Ext GWT: Discussion
    Replies: 5
    Last Post: 2 Aug 2010, 8:40 AM
  2. esc key not working
    By businessman332211 in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 17 Dec 2008, 12:28 PM
  3. [2.2] Disabled window closable using esc key in FF3
    By The0s in forum Ext 2.x: Bugs
    Replies: 0
    Last Post: 20 Oct 2008, 7:01 AM
  4. treeeditor with esc key
    By cecol in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 1 Jan 2008, 11:09 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts