PDA

View Full Version : [FIXED-112][3.0.0] Grid tab key navigation



nascom
10 Aug 2009, 3:17 AM
Hi,

were experiencing the Problem that in Firefox the Editor Grid Tab Order is not behaving the way it should.

To Reproduce the Problem:

Go to http://www.extjs.com/deploy/dev/examples/grid/edit-grid.html.
Click "Add Plant".
In the "Common Name"-Column type whatever you want.
Press TAB.
Now in the "Light"-Column delete all the text by holding BACKSPACE.
When the Column is empty type for Example: "s" (for Shade) and press TAB.

Voila! You've just selected the edit-grid.js (http://www.extjs.com/deploy/dev/examples/grid/edit-grid.js) Link.

This isn't supposed to happen, right?

Note: This only happens with Firefox.

mjlecomte
10 Aug 2009, 6:16 PM
Thanks for the report. keyboard navigation in the grid is being assessed.

nascom
10 Aug 2009, 10:58 PM
Thanks for the report. keyboard navigation in the grid is being assessed.

For us Keyboard Navigation is the most important thing.
Is there any Hotfix or Workaround for this Issue?

mjlecomte
11 Aug 2009, 2:34 AM
For us Keyboard Navigation is the most important thing.
Is there any Hotfix or Workaround for this Issue?

See http://extjs.com/forum/showthread.php?t=71015, including #4

evant
11 Aug 2009, 5:20 PM
A fix for this has been added to SVN.

mystix
11 Aug 2009, 6:17 PM
A fix for this has been added to SVN.

just checked out SVN HEAD.
the KeyNav#stopKeyUp() method was omitted from both the 2.x and 3.x branches. ;)

mystix
11 Aug 2009, 6:29 PM
additionally, in the 2.x branch (SVN HEAD)


the Ext.Editor#onRender() method is missing a check for this.swallowKeys:


if(this.swallowKeys){
this.field.el.swallowEvent([
'keypress', // *** Opera
'keydown' // *** all other browsers
]);
}


the Ext.form.Field#initEvents() method needs to use the the new Ext.EventManager.useKeyDown flag:
(it would also help if the original comment for the 10ms buffer was re-added to the codebase for both the 2.x and 3.x branches)


initEvents : function(){
// this.el.on(Ext.isIE || (Ext.isWebKit && !Ext.isSafari2) ? "keydown" : "keypress", this.fireKey, this);
this.el.on(Ext.EventManager.useKeydown ? 'keydown' : 'keypress', this.fireKey, this);
this.el.on("focus", this.onFocus, this);

// standardise buffer across all browsers + OS-es for consistent event order.
// (the 10ms buffer for Editors fixes a weird FF/Win editor issue when changing OS window focus)
this.el.on('blur', this.onBlur, this, this.inEditor ? {buffer:10} : null);
},

mystix
12 Aug 2009, 12:23 AM
spotted one more:

there's a now defunct Ext.grid.GridPanel#onKeyDown() method in the 2.x branch.
this should be removed to prevent any possible confusion and keep the 2.x / 3.x changes in sync.