-
9 Nov 2010 1:22 PM #1
Ext.Window key ESC does not work after onclick
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.
values for things like psDaysValue and others are populated just outside this method but they are there.Code: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() { win.close(); }, stopEvent: true, scope: win }] });
-
9 Nov 2010 1:25 PM #2
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.
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
9 Nov 2010 1:44 PM #3
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
-
Closing Window widget when ESC key is pressed
By Umashanthi in forum Ext GWT: DiscussionReplies: 5Last Post: 2 Aug 2010, 8:40 AM -
esc key not working
By businessman332211 in forum Ext 2.x: Help & DiscussionReplies: 6Last Post: 17 Dec 2008, 12:28 PM -
[2.2] Disabled window closable using esc key in FF3
By The0s in forum Ext 2.x: BugsReplies: 0Last Post: 20 Oct 2008, 7:01 AM -
treeeditor with esc key
By cecol in forum Ext 1.x: Help & DiscussionReplies: 0Last Post: 1 Jan 2008, 11:09 PM


Reply With Quote