[kupu-dev] List Re-ordering Tab focus problem fixed

Jasper Op de Coul jasper at infrae.com
Mon Sep 8 17:02:29 CEST 2008


Hi List,

On previous versions of Firefox (<3), pressing the tab key would 
indent/outdent lists and paragraphs.
In Firefox3 the tab key is used exclusively for focus.
We had some requests to revert this behavior so pressing tab in the 
editor never changes focus, and performs the editor commands.

Some interesting background reading:

http://www.glazman.org/weblog/dotclear/index.php?post/2008/08/06/GRRRRRRR


I added the following snippet to the bottom of the 
KupuEditor.prototype.afterInit function:


     doc.addEventListener('keydown', function(event){
         if (window.event) event = window.event;
         if (event.keyCode == '9') {
             if (event.shiftKey){
                 kupu.execCommand('outdent');
             }else{
                 kupu.execCommand('indent');
             }
             event.preventDefault();
         }
     }, true);

I don't have checkin rights on codespeak, I fixed this in the Silva 
specific Kupu code for now, but I think more users would be interested
in this.

Kind regards,
Jasper

-- 
Jasper Op de Coul -- Infrae
t +31 10 243 7051 -- http://infrae.com
Hoevestraat 10 3033GC Rotterdam -- The Netherlands


More information about the kupu-dev mailing list