Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: [2.0.1][OPEN] modal dialog can be bypassed by tab pressing

  1. #21
    Sencha User
    Join Date
    Sep 2007
    Posts
    46

    Default

    Nice [email protected]!

    Thanks for updating it to avoid the focus rect.
    Kavih Williams
    CEO/Founder - Push Channels & Browser Not Included
    On Twitter

  2. #22
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    50

    Default Tabbing out of windows fix

    This is my fix for tabbing out of a windows (like some others, you need to set tabIndexes explicitly to something other than 0 for this to work):

    Code:
    Ext.Window.prototype.beforeShow = Ext.Window.prototype.beforeShow.createSequence(function(cmp) {
    	this.objTabIdxs = [];
    	var domObjArray = Ext.fly(document.body).select("*[tabIndex]");
    	Ext.each(domObjArray.elements, function(domObj) {
    		if(Ext.isDefined(domObj.tabIndex) && domObj.tabIndex != -1) {
    			this.objTabIdxs.push([domObj, domObj.tabIndex]);
    			domObj.tabIndex = -1;
    		}
    	}, this);
    });
    Ext.Window.prototype.hide = Ext.Window.prototype.hide.createSequence(function(cmp) {
    	Ext.each(this.objTabIdxs, function(domObjTabIdx) {
    		var domObj = domObjTabIdx[0];
    		var tabIdx = domObjTabIdx[1];
    		domObj.tabIndex = tabIdx;
    	});
    	// clear object (in case it causes a memory leak?)
    	this.objTabIdxs = [];
    });
    It's based on Animal's approach: here. First part stores away the current dom objects and tab indices, second part re-sets them. As mentioned above, the objects need a tabIndex explicitly set to something other than 0 for this to work. It doesn't check if the window's modal, so it probably just assumes all windows are.

  3. #23
    Sencha User
    Join Date
    Dec 2011
    Posts
    10

    Default

    This bug still exists on ExtJS version 5.0.1.1255. The form is losing focus.

  4. #24
    Sencha User
    Join Date
    Dec 2011
    Posts
    10

    Default FIXED

    This bug was FIXED on version 5.1.0

Page 3 of 3 FirstFirst 123

Posting Permissions

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