Categories | Question details Back To List | ||
GRID: Mac/FireFox keyboard entry doesn't work. Hi, Using Firefox on the Mac, I can't use the TAB key to move between cells (in my application, AND in all the examples on your website). Pressing TAB causes focus to leave the grid entirely. Is there a workaround for this? Thanks in advance, Jon. Versions: Mac os 10.5.4 Firefox 2.0.0.12 Answer posted by Support on Jan 14, 2009 01:58 Answer posted by Jon on Jan 15, 2009 19:51 Hi again, Thanks - I've checked the page you recommended, and applied the following settings as recommended in that article... 1. System Preferences/Keyboard & mouse/Full Keyboard Access is set to "All Controls" 2. I've added "accessibility.tabfocus=7" to the Firefox config. However, the TAB key is STILL misbehaving, even in YOUR OWN grid samples pages (http://www.dhtmlx.com/docs/products/docsExplorer/index.shtml?type=smpl) STEPS TO REPRODUCE: (2 scenarios) A) Navigate to the following sample on your website: "dhtmlxGrid / Navigation / Keymap - excel" 1. Click in top-left cell (row 0, col A). 2. Keep pressing TAB. When focus reaches the "In Store" column, focus is ALSO given to the mailto:SALES@DHTMLX.COM link on the bottom of your page. 3. Press ENTER, focus moves down a row in the Grid, AND the "Mailto:" link is also activated!!! 4. Keep pressing TAB, and focus now moves outside the grid, and around the rest of the page then back to the address bar. OR, B) Navigate to the following sample on your website: "dhtmlxGrid / Navigation / Keymap - access" 1. Click in top-left cell with mouse (row 0, col A). 2. Press TAB, and focus moves in the grid to COL B (good)... BUT! Focus is *ALSO* given to the first page link beneath the grid. (where it says "1, 2, 3 >") 3. Keep pressing TAB, and as focus moves across the columns in the grid, it also appears to randomly jump between the "page 1, 2, 3" links underneath the grid.
POSSIBLE SOLUTION REQUIRING YOUR HELP: I've already written some custom code for handling the LEFT & RIGHT arrow key presses. I could use this code to handle the TAB key as well so that it behaves the same as the arrow keys, but I can't work out how to disable the default Tab behaviour in Firefox on Mac. I've tried adding the following code to "dhtmlxgrid.js": (line 222-ish): .....this.doKey=function(ev) { if (ev.keyCode==9) { ev.preventDefault(); ev.stopPropagation(); [then a call to my custom code to handle arrow keys goes here] return false; } ... } However, this STILL doesn't prevent TAB from popping out of the grid, and into other controls on my page. PLEASE HELP ME!! Thanks, Jon.
Answer posted by Support on Jan 16, 2009 05:46 In addition to applied code modification , you can try to add next line to grid's init. dhtmlxEvent(grid.entBox,"keypress",function(e){ (e||event).cancelBubble=true; } ); It will block any not-handled key events propagation.. |