View Full Version : [CLOSED] [4.1.3] Grid focus is lost after popup

14 Aug 2013, 2:31 AM
I have a grid and have defined keyboard shortcuts. The problem is that if something pops up and I close it, the grid loses focus. For example, let's say that I click on a menu item in the grid that pops up a panel and I click on cancel in the floating panel. The panel closes but the grid loses focus.

14 Aug 2013, 2:51 AM
This isn't a bug. When you close the window, the focused dom element gets destroyed, which means the focus returns to the default element (the document).

We don't attempt to track any kind of focus stack, it would end up being quite complicated and involved.

As a trivial example:

var bar = Ext.get('bar'),
foo = Ext.get('foo');

foo.dom.parentNode.innerHTML = '';
// Now what? The focus has been moved to the document since foo is destroyed and we have no way of knowing

14 Aug 2013, 2:55 AM
I don't understand what you are saying. I will restate the problem. The Grid is in the main page, not the popup. The popup is some other panel (e.g. a Form). When the form is 'canceled' why can't the focus be returned to the grid?

14 Aug 2013, 3:03 AM
As I said above, we don't make any attempt to track focus in such a way.