Opened 16 years ago

Last modified 16 years ago

#5892 closed Bug

Table tab behavior interfering with customized tab behavior — at Version 3

Reported by: Lynne Kues Owned by:
Priority: Normal Milestone: CKEditor 3.4
Component: General Version:
Keywords: IBM Pending Cc:

Description (last modified by Frederico Caldeira Knabben)

FF 3.6 only. The issue does not exist on IE. Version 3.4 Beta.

We are hooking tab to perform indent/outdent. This behavior no longer works in FF with the tab behavior that exists for tables. Perhaps this is not a bug, but an incorrect implementation on our part. Here is the code we are using:

// Use tab to indent and outdent.  Use ctrl-tab, ctrl-shift-tab
// to move focus out of the editor
editor.addCommand('blur', {
    exec : function() {
        editor.container.focusNext(true, editor.tabIndex);
    }
});
editor.addCommand('blurBack', {
    exec : function() {
        editor.container.focusPrevious(true, editor.tabIndex);
    }
});
editor.on("key", function(ev) {
    var keyCode = ev.data.keyCode;
    if (keyCode == 9)	{
        ev.cancel();
        editor.execCommand("indent");
    }
    if (keyCode == (CKEDITOR.SHIFT + 9)) {
        ev.cancel();
        editor.execCommand("outdent");
    }
    if (keyCode == (CKEDITOR.CTRL + 9))	{
        ev.cancel();
        editor.execCommand("blur");
    }
    if (keyCode == (CKEDITOR.CTRL + CKEDITOR.SHIFT + 9)) {
        ev.cancel();
        editor.execCommand("blurBack");
    }
});

Change History (3)

comment:1 Changed 16 years ago by Tobiasz Cudnik

Keywords: Pending added

I've successfully used you code in both IE and FF 3.6. In both cases, tab/shift+tab was performing indentation and no other action. This includes table cells (content in the cell was indented.

Could you explain more precisely what's your expected behavior and what actually happens ?

comment:2 Changed 16 years ago by Tobiasz Cudnik

Keywords: Pending removed

Please ignore my previous comment, i wasn't testing the correct branch. Sorry for any confusion.

comment:3 Changed 16 years ago by Frederico Caldeira Knabben

Description: modified (diff)
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy