lenzb
04-27-2007, 07:14 PM
We are using Ext.BasicDialog for many popup windows in our application. Oftentimes, there can be more than one popup window displayed on the screen at a time. We attach the <esc> key as a keyListener to each of our BasicDialogs to allow the windows to be closed with a keypress.
After closing one window, whatever underlying window there may be will not regain focus and thus will not respond to the <esc> key for closing. Here's a scenario:
- Open multiple popups
- Close the topmost popup (either with <esc> or by using the "X")
- Hitting <esc> to close the next topmost window will not close the window (as I believe it should)
This doesn't work because upon closing a window, the next topmost window is not given focus. If I do something to give it focus (either via a direct javascript call to the focus() method via Firebug console or by dragging the window on the page), then the <esc> key will close the window appropriately. Thus, I think the fix is to just give focus to the next topmost window after hiding a window.
I would have added a hook into the Ext.DialogManager to handle doing this for me, but the internal "list" and "accessList" attributes of the DialogManager are not exposed in any way, so my hands are tied (short of modifying ext source, which I'd rather not do).
Do you agree this is a bug? Is there any other alternative to my problem that I am not seeing?
Thanks in advance for your help :)
Brian
After closing one window, whatever underlying window there may be will not regain focus and thus will not respond to the <esc> key for closing. Here's a scenario:
- Open multiple popups
- Close the topmost popup (either with <esc> or by using the "X")
- Hitting <esc> to close the next topmost window will not close the window (as I believe it should)
This doesn't work because upon closing a window, the next topmost window is not given focus. If I do something to give it focus (either via a direct javascript call to the focus() method via Firebug console or by dragging the window on the page), then the <esc> key will close the window appropriately. Thus, I think the fix is to just give focus to the next topmost window after hiding a window.
I would have added a hook into the Ext.DialogManager to handle doing this for me, but the internal "list" and "accessList" attributes of the DialogManager are not exposed in any way, so my hands are tied (short of modifying ext source, which I'd rather not do).
Do you agree this is a bug? Is there any other alternative to my problem that I am not seeing?
Thanks in advance for your help :)
Brian